HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trig help!

09-16-2003, 05:49 AM#1
Blo0d-Angel
This is my trig and for some reason it works erratically sometimes sending units up one path up to 3 times in a row. This should not be possible. What's wrong with it?

Event:
Unit - A unit enters OrcHall <gen>

Conditions:
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)

Actions:
If (OrcStrongholdPathing Equal to 0) then do (Unit Group - Pick every unit in (Units in OrcHall <gen> owned by Player 5 (Yellow)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of OrcSpawnBottum 2 <gen>))) else do (If (OrcStrongholdPathing Equal to 1) then do (Unit Group - Pick every unit in (Units in OrcHall <gen> owned by Player 5 (Yellow)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of OrcSpawnLeft 2 <gen>))) else do (Unit Group - Pick every unit in (Units in OrcHall <gen> owned by Player 5 (Yellow)) and do (Unit - Order (Picked unit) to Attack-Move To (Center of OrcSpawnRight 2 <gen>)

If (OrcStrongholdPathing Equal to 2) then do (Set OrcStrongholdPathing = 0) else do (Set OrcStrongholdPathing = (OrcStrongholdPathing + 1))
09-16-2003, 06:49 AM#2
Danexx
Conditions:
(Owner of (Entering unit)) Equal to Player 5 (Yellow)
09-16-2003, 07:19 AM#3
Blo0d-Angel
I dont' see how that is the problem. IF the problem was the condition it would never move the units.
09-16-2003, 10:36 AM#4
ABM
it is true that u really should be carefull about what u use as term...
try to do if orchall=0 do units...ect.......else do nothing
if orchall=1 do units......else do nothing
if orchall=2 do units.....else do nothing

i am not sure that if u separate better the trigger instead of putting all if if if together it might work better but u can try ...
if ur trigger work after the (entering units) change well do as if i said nothing ;)....

hope i helped if not i at least tryed....
09-17-2003, 12:18 AM#5
Blo0d-Angel
No the condition change did nothing but I'll try your idea to simplify the if structure.
09-17-2003, 12:48 AM#6
Blo0d-Angel
Removing the compound If structure worked. Thanks