Jump to content

Making prompt groups


bolmin
 Share

Recommended Posts

Hi everyone, it is me yet again

In rdrfr I saw that there are custom made prompt groups and I want to ask the developers how they achieved that, since I don't know any native to create a prompt group. I suppose that in RPH there is a function that does that, so I'm still looking for that. In case you don't understand what I mean, I attached a screenshot where the prompt group is called "Sheriff's Desk".

 

Screenshot_66.png.18e70ef676d805781681d5b144cf947e.png

Link to comment
Share on other sites

You see the problem is that this prompt group is not naturally there. I don't know if it exists in the game at some point, but it seems to be added for the mod. I am asking if it is possible to create a new prompt group with a new name. Also while we are talking about prompts, I am don't know how to check if the player is focusing on a ped so that the dialogue options appear. I know that there is a native that returns the entity player is free aiming at and the target entity, but both of these do not return anything when just locking on a ped. 

Link to comment
Share on other sites

We use a mixed approach in RDRFR. We get the group id as just Lambda has shown you, but also set the desk's group to be the active ambient prompt group if the player is close via 0x315C81D760609108 / _UIPROMPT_SET_AMBIENT_GROUP_THIS_FRAME. This is also where we feed the key (not the actual string!) to our custom name.

  • Like 1
Link to comment
Share on other sites

On 1/11/2021 at 10:07 PM, bolmin said:

I know that there is a native that returns the entity player is free aiming at and the target entity, but both of these do not return anything when just locking on a ped. 

From my testing "free aim" means your aim being free - not locked onto a ped - as it works when not targeting anything or "freely"? aiming around with a gun. 
I'm using ScriptHookDotNet and this piece of code to check what you're locked onto.

                OutputArgument outputTarget = new OutputArgument();
                if (Function.Call<bool>(Hash.IS_PLAYER_TARGETTING_ANYTHING, Game.Player)){
                    if (Function.Call<bool>(Hash.GET_PLAYER_TARGET_ENTITY, Game.Player, outputTarget)){
                        if (outputTarget.GetResult<Entity>().EntityType == EntityType.Ped){
                            Ped theTarget = outputTarget.GetResult<Ped>();
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...