| 10-23-2004, 03:37 AM | #1 |
Ok now that i got help on the Select/command thing I found a another problem when I want to take units away from an enemy or kill an enemy unit using my -kill unit or -give unit red command its kinda of slow because you can only click on one enemy unit so i thought that mabye i could do = as a command that will redo the last command given..Though im not sure how i can do this.. help |
| 10-23-2004, 04:51 AM | #2 |
I'd store the last command trigger executed to a variable unique to each player, then when the player types "=" have it execute that trigger. Easiest way I see to do this in GUI is with a trigger array using the player number for the index. First create a trigger array variable named LastCommand, then do something like this: Code:
Repeat
Events
Player - Player 1 (Red) types a chat message containing = as An exact match
Player - Player 2 (Blue) types a chat message containing = as An exact match
Player - Player 3 (Teal) types a chat message containing = as An exact match
...
Conditions
Actions
Trigger - Run LastCommand[(Player number of (Triggering player))] (ignoring conditions)
CommandExample
Events
Player - Player 1 (Red) types a chat message containing -kill as An exact match
...
Conditions
Actions
(Kill stuff etc)
Set LastCommand[(Player number of (Triggering player))] = (This trigger)You'll want to add the set LastCommand line to all of your triggers that you want to be repeatable. This won't work if you're using SubString to get the parameters of whatever command they entered, but it didn't sound like you are. |
| 10-23-2004, 03:12 PM | #3 |
All right you guys you seem to know every thing lol thanks alot |
