So I was able to make a Basic UI Dailogue and now i'd like to know how i can make each 'button' create their own distinct unit on the map. I checked the events and it provides a only "any button clicked" event for the trigger to be activated. Now that leads to using conditions, but I dont know what kind of conditions i would need to make this work.
Well now you need to determine which button was clicked and which actions to take from that. Usually what I do is have one trigger with the "Any button clicked" event, and then for the actions I use a bunch of if then else statements. For the condition in the if then else, if would be something like "Button clicked = <your button variable>" and the actions would be what you want. Make sure that after you create your dialog buttons you use <variable> = (last created dialog button) to assign them to variables.
Ok, but I have my dialog trigger moddeled as an action definitions where I can easily adjust how many texts are made. How can I individually modify these dialogue text as seperate variables if the action definitions creates dialogues through a cycle?
So I was able to make a Basic UI Dailogue and now i'd like to know how i can make each 'button' create their own distinct unit on the map. I checked the events and it provides a only "any button clicked" event for the trigger to be activated. Now that leads to using conditions, but I dont know what kind of conditions i would need to make this work.
Well now you need to determine which button was clicked and which actions to take from that. Usually what I do is have one trigger with the "Any button clicked" event, and then for the actions I use a bunch of if then else statements. For the condition in the if then else, if would be something like "Button clicked = <your button variable>" and the actions would be what you want. Make sure that after you create your dialog buttons you use <variable> = (last created dialog button) to assign them to variables.
Ok, but I have my dialog trigger moddeled as an action definitions where I can easily adjust how many texts are made. How can I individually modify these dialogue text as seperate variables if the action definitions creates dialogues through a cycle?
@Septhie: Go
Bump^
@Septhie: Go
If I understand you well, you need to create an array of dialog variables. And probably a counter too for keeping track of buttons created.
Then every time you create one dialog button, you do
Set Dialog Button[Counter] to last created dialog item.
Modify Counter + 1.
That way, you can reference the Dialog Buttons later...
If (dialog item used == Dialog Button[0]) -> Create Marine unit for example.
If (dialog item used == Dialog Button[1]) -> Create Marauder unit for example.
If (dialog item used == Dialog Button[2]) -> Create Reaper unit for example. ...