GML Change Dialogue

Hello, I have a doubt, I'm doing a Textbox, with dialogues and all of that, and I want to put another different dialogue when I've talked to a person. For example, I've finished a dialogue with a person, and if I interact again, I want to another different dialogue. Help please :(.
 
Last edited:
C

CedSharp

Guest
This means you need to "remember" if you talked to that person or not.
In programming, we "remember" things very often, by using variables.

You could do something like creating an array or list of dialogs you want to show.
You would then create a variables that tracks which dialog should be displayed.

something like this (pseudo code):
Code:
// Create event
dialogs = [
  dialog_start,
  dialog_continue,
  dialog_end
]

current_dialog = 0;

// When you want to display a dialog
var dialog = dialogs[ current_dialog ];
show_dialog(dialog);

// If we are not showing the last dialog yet,
// make the object remember to show the next dialog
// next time we interact with it
if(current_dialog < 2) current_dialog++;
Something like this is probably what you are looking for.
Hope this helps.
 
Top