Jump to content
HazyTube

How to make conversation with witness

Recommended Posts

Hello everyone, I was wondering how i could make a conversation with a witness for a callout? I tried it alot of times but still not working. Here is my code that I use for the conversation:

 

            if (Game.LocalPlayer.Character.DistanceTo(StoreOwner.Position) < 2f)

            {
                Game.DisplayHelp("Press Y to begin speaking to the Store Owner");
                if (Game.IsKeyDown(Keys.Y))
                {
                    Game.DisplaySubtitle("Store Owner: Hey officer! I'm the store owner.");
                    Game.DisplaySubtitle("You: Hello, did you see what happend?");
                    Game.DisplaySubtitle("Store Owner: This guy here put some weird stuff in her food.");
                    Game.DisplaySubtitle("Store Owner: Now she is unconscious.");
                    Game.DisplaySubtitle("Store Owner: That's everything I can tell you officer.");
                }
            }

 

I hope someone can help

  •  
  • EDIT: I dont need help anymore!
  • For a simple conversation, put a duration behind the text and pause the gamefiber after every line
Edited by HazyTube
No support needed anymore

Share this post


Link to post
Share on other sites

Did you find out how to do it?  If yes, you can post here your answer, so if anyone has the same problem as you, to help him. Thanks


HELLO!!     I'm a Greek guy and YouTuber.   I really like Modding and playing LSPDFR!  I'm  very familiar with Programming (Coding) and PC Hardware / Software. I'm also a Cuber ( I Solve Rubicks Cubes and other kinds).   

My YouTube Channel:  https://www.youtube.com/c/ATGGGR/

 

 

 

Share this post


Link to post
Share on other sites
30 minutes ago, AlexanderK. said:

Did you find out how to do it?  If yes, you can post here your answer, so if anyone has the same problem as you, to help him. Thanks

Uploading the answer is wayy to much work, you have to make 2 new classes and a bunch of code.

32 minutes ago, AlexanderK. said:

Did you find out how to do it?  If yes, you can post here your answer, so if anyone has the same problem as you, to help him. Thanks

I have included a simple solution know.

Share this post


Link to post
Share on other sites
private readonly List<string> dialogWithPed = new List<string>()
{
    "Officer: BLA BLA BLA",
    "Ped: BLA BLA BLA"
};
private int dialogWithPedIndex;
if (!Game.IsKeyDown(Keys.Y)) return;

if (dialogWithPedIndex < dialogWithPed.Count)
{
    Game.DisplaySubtitle(dialogWithPed[dialogWithPedIndex]);
    dialogWithPedIndex++;
}

if (dialogWithPedIndex == dialogWithPed.Count + 1)
{
    //
}
2 hours ago, HazyTube said:

Uploading the answer is wayy to much work, you have to make 2 new classes and a bunch of code.

2 classes lmao

Edited by NoNameSet

Share this post


Link to post
Share on other sites
1 hour ago, NoNameSet said:

private readonly List<string> dialogWithPed = new List<string>()
{
    "Officer: BLA BLA BLA",
    "Ped: BLA BLA BLA"
};
private int dialogWithPedIndex;

if (!Game.IsKeyDown(Keys.Y)) return;

if (dialogWithPedIndex < dialogWithPed.Count)
{
    Game.DisplaySubtitle(dialogWithPed[dialogWithPedIndex]);
    dialogWithPedIndex++;
}

if (dialogWithPedIndex == 2)
{
    //
}

2 classes lmao

huh I used a way diffrent method, lol if I would know this method before, should have saved me alot of time haha

Share this post


Link to post
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.


×
×
  • Create New...