| 07-13-2004, 02:33 PM | #1 |
okey i am making a hero defend but i suck at making triggers so i need help with a trigger i want 90 units to be created and then i want them to attack move but they wont attack move so i need a good trigger so they will do it can someone make 1 for me plz ^_^ |
| 07-13-2004, 03:24 PM | #2 |
intVariable... this is an integer variable that is used in the loop (don't use it in any other trigger). levelVariable... this is an integer variable that tells you which level you are at. attackingUnitType()... this is a unit-type variable array spawnPoint, targetPoint... these are point variables. Code:
Events: map initialization Conditions: Actions: set spawnPoint = center of (SpawnRegion <gen>) set targetPoint = center of (TargetRegion <gen>) set attackingUnitType(0) = Level1 attacking unit type set attackingUnitType(1) = Level2 attacking unit type set attackingUnitType(2) = Level3 attacking unit type ... .. . Code:
Events:
Unit - player owned unit event - a unit owned by player 12 dies
Conditions:
Integer comparison - unit - count living units owned by player - number of living attackingUnitType(levelVariable - 1) owned by player 12 equal to 0
Actions:
game - display to all players the text: Level completed. Next level in 10 seconds.
wait 10.00 game time seconds
For each integer intVariable from 1 to 90 do actions
loop - actions
unit - create 1 attackingUnitType(levelVariable) for player 12 at spawnPoint
unit - issue order targeting a point - order (last created unit) to (attack move) to targetPoint
wait 0.10 game time seconds
set levelVariable = levelVariable + 1 |
| 07-13-2004, 04:42 PM | #3 |
thx man hope it works ![]() |
| 07-19-2004, 06:26 AM | #4 |
i just helped some dude on this search forums for spawn trigger... i explained it there GL ![]() |
| 07-19-2004, 06:28 AM | #5 | |
Quote:
I think you should've posted a link to the topic so he wouldn't have to go through the trouble of searching for it. |
| 07-19-2004, 06:50 AM | #6 |
sigh* fine... here it is http://www.wc3campaigns.com/showthread.php?t=60533 |
| 07-19-2004, 06:56 AM | #7 |
Thanks.. he could've searched for it and found the wrong topic several times before he found the correct one. If your gonna speak of another topic somewhere, and tell them to view it, it's best to give a link. Sorry for the trouble. |
