1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice
  2. NOTICE: We will be applying a Xenforo update on Tuesday 25th of February. This means that from approximately 10:00 to 14:00 BST the forums will be offline (or possibly longer). Sorry for the inconvenience! Official Announcement here.

GML Change Dialogue

Discussion in 'Programming' started by Chope Carne, Sep 4, 2019.

  1. Chope Carne

    Chope Carne Member

    Sep 4, 2019
    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: Sep 4, 2019
  2. CedSharp

    CedSharp Member

    Sep 5, 2016
    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):
    // Create event
    dialogs = [
    current_dialog = 0;
    // When you want to display a dialog
    var dialog = dialogs[ current_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.

Share This Page