| 09-23-2003, 02:27 AM | #1 |
Ok idecided to make my own style of race choosing. My method involves triggers and dialog. this can be used with ROC ok here it is...... ------------------Trigger 1------------------------------------------ Event Player - Player 1 (Red) Selects a unit ---add other players as needed--- Condition (Owner of (Triggering unit)) Equal to Neutral Passive ---Or whatever the Race choices are grouped in--- (Count non-structure units controlled by (Triggering player) (Exclude incomplete units)) Equal to 0 Action Dialog - Show Racechooser for (Triggering player) ---Racechooser is a variable--- Dialog - Change the title of Racechooser to (Choose the + (Name of (Triggering unit))) Dialog - Create a dialog button for Racechooser labelled Yes Set yes = (Last created dialog Button) ---set variable--- Dialog - Create a dialog button for Racechooser labelled no Set NO = (Last created dialog Button) ---set variable--- Dialog - Show Racechooser for (Triggering player) Set UNITTYPE = (Unit-type of (Triggering unit)) ---set variable--- Set Unitowner = (Triggering player) ---set variable--- -------------------------------trigger 2---------------------------------- Event Dialog - A dialog button is clicked for Racechooser ---Notice this uses the variables from trigger 1--- condition (Clicked dialog button) Equal to yes ---Notice this uses the variables from trigger 1--- Action Unit - Create 1 UNITYPE for Unitowner at (Center of Region 000 <gen>) facing Default building facing degrees ---Notice this uses the variables from trigger 1--- Dialog - Clear Racechooser ---Notice this uses the variables from trigger 1--- -------------------------------Trigger 3-------------------------------------- Event Dialog - A dialog button is clicked for Racechooser ---Notice this uses the variables from trigger 1--- Condition (Clicked dialog button) Equal to NO ---Notice this uses the variables from trigger 1--- Action Dialog - Clear Racechooser ---Notice this uses the variables from trigger 1--- -------------------------------------------------------------------------------- Please post any questiones and or comments about this Little trigger group.... and if u have modifications for it plz and thank you. Edit: This displays the selected units name can be changed to display the units stats.... |
| 10-17-2003, 01:48 AM | #2 |
just for size and simplicity you could combine triggers 2 and 3 into one trigger as such: This brings it all down to just one simple trigger. -------------------------------trigger 2---------------------------------- Event Dialog - A dialog button is clicked for Racechooser Action IF: (Clicked dialog button) Equal to yes THEN : Unit - Create 1 UNITYPE for Unitowner at (Center of Region 000 <gen> ) facing Default building facing degrees ELSE: Do Nothing Dialog - Clear Racechooser |
| 10-17-2003, 01:29 PM | #3 |
If you click a button the dialog would automaticly be cleared so no use of the last action |
| 10-17-2003, 01:47 PM | #4 |
actually you need the statment Hide Racechosser so it will go away |
| 10-18-2003, 05:54 PM | #5 |
Actually u dont need the Hide Dialog command for it to go away. Because it gos away when someone clicks on it and this is an outdated oldmethod i made a while back. and if u dont clear it u will have 4 buttons pop up instead of 2 |
