I was able to make a dialog with a button that when clicked, spawns a unit. How do I make it so that each button gives a different unit. I have not been able to add a dialog to a variable so I am stumped on what to do. Help would be appreciated.
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.
Each dialog button you make you add to a different variable. Since you want them to all spawn units you might consider an array. In response to a button press event you check if the dialog is visible (to avoid exploits) and then search through the array of buttons to find which button was pressed. You can then spawn the appropriate unit type.
The key part here is to use a variable of type "dialog item" (int in Galaxy) and not just a dialog. A dialog is the container, a dialog item is a reference to an item inside a dialog. The button is a dialog item. You want to add each button to a dialog item array so you can find out which button was pressed and do the appropriate actions.
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.
I was able to make a dialog with a button that when clicked, spawns a unit. How do I make it so that each button gives a different unit. I have not been able to add a dialog to a variable so I am stumped on what to do. Help would be appreciated.
http://www.sc2mapster.com/assets/nolanstars-textures/
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.
Each dialog button you make you add to a different variable. Since you want them to all spawn units you might consider an array. In response to a button press event you check if the dialog is visible (to avoid exploits) and then search through the array of buttons to find which button was pressed. You can then spawn the appropriate unit type.
The key part here is to use a variable of type "dialog item" (int in Galaxy) and not just a dialog. A dialog is the container, a dialog item is a reference to an item inside a dialog. The button is a dialog item. You want to add each button to a dialog item array so you can find out which button was pressed and do the appropriate actions.
Was using a dialog item, but could not figure out how to link the variable, as the set variable didn't seem to work.
I'll try using an array.
http://www.sc2mapster.com/assets/nolanstars-textures/
Be sure to check out the extension mod: Hots Custom Map support on NA and EU, Despite the name it greatly expands the roster of options for the default 3 races and is updated all the way to NCO.
does the condition "dialog item used==" work?
Set dialog item = last created dialog item
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)