Hello there, I have known how to make a button dialog in triggers for a while now, and I know how to make something do something if a button is clicked, but what I don't know is how to refer to specific triggers, because at this point when I make an event that happens when a button dialog is used it will do the said event no matter what button is clicked. What i want is to make it so you have two buttons, and the two buttons will spawn a different unit depending on which one the player clicks. I have created the two buttons but I don't know what event to play for this to work the way I want. When I try last created dialogas ht event and then in two separate triggers, both with the same event, I make the action for the units spawning, but in game it creates both units. So how do I achieve my goal and make two different buttons do different thing when clicked?
you need to set the dialog buttons as a variable, the variable type should be Dialog Item and Finally you need a condition for the trigger that looks like this Used Dialog Item == Dialog Item Variable
you need to set the dialog buttons as a variable, the variable type should be Dialog Item and Finally you need a condition for the trigger that looks like this Used Dialog Item == Dialog Item Variable
Create button for dialog
Set Button[1] = Last created dialog item
When adding a dialog item to a variable, it should look like this using the "Set Variable" Action. And then you need the conditions, like he said. Make sure that you create a Global variable with the type set to "Dialog Item".
Hello there, I have known how to make a button dialog in triggers for a while now, and I know how to make something do something if a button is clicked, but what I don't know is how to refer to specific triggers, because at this point when I make an event that happens when a button dialog is used it will do the said event no matter what button is clicked. What i want is to make it so you have two buttons, and the two buttons will spawn a different unit depending on which one the player clicks. I have created the two buttons but I don't know what event to play for this to work the way I want. When I try last created dialogas ht event and then in two separate triggers, both with the same event, I make the action for the units spawning, but in game it creates both units. So how do I achieve my goal and make two different buttons do different thing when clicked?
@benmenftw: Go
you need to set the dialog buttons as a variable, the variable type should be Dialog Item and Finally you need a condition for the trigger that looks like this Used Dialog Item == Dialog Item Variable
Create button for dialog
Set Button[1] = Last created dialog item
When adding a dialog item to a variable, it should look like this using the "Set Variable" Action. And then you need the conditions, like he said. Make sure that you create a Global variable with the type set to "Dialog Item".