How do I make a dialogue system

0 favourites
  • 4 posts
From the Asset Store
Template for a generic save / load system, fully documented in comments and video
  • hello all.

    i just need a little bit of help with some things.

    i want to make a platformer where i can talk to people. i don't mean respond or input text but, i press and button and they speak. i press it again and it takes me to the next line of dialogue.

    now i can make a text box appear but when it comes to doing it for a complete game with diffrent dialogue from different npc's , i have no clue how to implement this.

    for example in castlevania dawn of sorrow (or any of the newer ones) they have cutscenes and shop keepers. i assume the text is stored somewhere, and i assume when you come in close contact and press a button the text is extracted and added to a text box in a certain way. i assume an array is involved .

    how you code/implement this is a head scratcher, i just want my player to be able to talk to people and read signs and what not without having to code a specific text box for each situation.

    i know from rpg maker each npc or character or even object has a way to store text and code . when you interact with them its extracted and read accordingly. i have been trying to find a way to have each npc store additional lines of text and have them extracted in specific situations since that system is so easy to use. (you have to boots, you dont have the boots)

    everything i have tried has been extremely resource heavy and obviously the wrong way to go about it (event sheets for each npc or an invisible text box for each npc)

    tl;dr how do you read and write to a text box, similar to reading a sign in a game or talking to a npc. where do i store the text and how do i extract it. also how will i do this for multiple npc's in a game with multiple instances. the rpg maker dialogue system is a great example of what im looking for in a resource economic way .

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You could give the npc's text instance variables and set a text object to the instance variable on trigger..

    Let's call the instance variable collisiontext, then the event would be:

    player on collision with npc - text - set text to : npc.collisiontext

  • thatnks for reply!

    ill try this but im afraid its not quite the answer in full.

    variables are about as far as i can get.

    as soon as the text box appears thats it, i dont know how to make the dialogue wrap into the next line upon pressing whatever button. would i make multiple text instance variables for each line of dialogue or is there a way to wrap the dialogue ?

    is there any example i can see with npc's in it , i have yet to find it

  • There are a few examples in the FAQ topic..

    you could for instance work with the tokenat expression to have multiple lines in one variable..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)