HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with multiple triggers..

08-11-2008, 11:52 AM#1
dabest2503
1.
Trigger:
Variables
Collapse Events
Time - Elapsed game time is 0.05 seconds
Conditions
Collapse Actions
Set RandomZombieAction[1] = (Position of Survivor[(Random integer number between 1 and 11)])
Set RandomZombieAction[2] = (Random point in (Playable map area))
Trigger:
Zombie spawns
Collapse Events
Time - Every 5.00 seconds of game time
Conditions
Collapse Actions
Unit - Create 1 Zombie for Player 12 (Brown) at (Center of Undead Spawn Spot <gen>) facing Default building facing degrees
Unit - Order (Last created unit) to Attack-Move To RandomZombieAction[(Random integer number between 1 and 2)]
Sound - Play ZombieSpawnSound <gen>

Basically, these 2 triggers are supposed to make a "zombie" do either of 2 actions (as stated above). The zombies are able to perform Action1 but not Action2. Any idea how to fix it?

2. I want to make "zombies" attack structures the moment they come within Z range of ANY TYPE of structure instead of units. I can't seem to make a trigger as such.

3.
Trigger:
Remove unused
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player[(Player number of (Triggering player))] slot status) Equal to Is unused
Collapse Then - Actions
Unit - Remove Survivor[(Player number of (Triggering player))] from the game
Collapse Else - Actions
Do nothing
Trigger:
Variables
Collapse Events
Time - Elapsed game time is 0.05 seconds
Conditions
Collapse Actions
Set Survivor[1] = Survivor 0000 <gen>
Set Survivor[2] = Survivor 0013 <gen>
Set Survivor[3] = Survivor 0014 <gen>
Set Survivor[4] = Survivor 0015 <gen>
Set Survivor[5] = Survivor 0016 <gen>
Set Survivor[6] = Survivor 0016 <gen>
Set Survivor[7] = Survivor 0017 <gen>
Set Survivor[8] = Survivor 0019 <gen>
Set Survivor[9] = Survivor 0020 <gen>
Set Survivor[10] = Survivor 0021 <gen>
Set Survivor[11] = Survivor 0022 <gen>
This trigger was meant to remove units owned by a certain player which is not being controlled. The trigger will not work at all. Help with it, please.
08-11-2008, 12:02 PM#2
Fireeye
For Nr. 3, replace "Trigger player" with "Picked player".
i don't see any problem in nr 1 (beside leaking 2 locations in trigger 1 and 1 in trigger 2), the only thing coming in my mind is the nasty GUI Variable Editor with the Array Size thing, try to set it to something higher than 1.
08-12-2008, 09:38 AM#3
Pyrogasm
The problem with the Zombies not doing Action2 is probably that your fourth trigger there runs before the first one! To fix this, just combine it all into 1 trigger:
Trigger:
Variables
Collapse Events
Time - Elapsed game time is 0.05 seconds
Conditions
Collapse Actions
Set Survivor[1] = Survivor 0000 <gen>
Set Survivor[2] = Survivor 0013 <gen>
Set Survivor[3] = Survivor 0014 <gen>
Set Survivor[4] = Survivor 0015 <gen>
Set Survivor[5] = Survivor 0016 <gen>
Set Survivor[6] = Survivor 0016 <gen>
Set Survivor[7] = Survivor 0017 <gen>
Set Survivor[8] = Survivor 0019 <gen>
Set Survivor[9] = Survivor 0020 <gen>
Set Survivor[10] = Survivor 0021 <gen>
Set Survivor[11] = Survivor 0022 <gen>
Set RandomZombieAction[1] = (Position of Survivor[(Random integer number between 1 and 11)])
Set RandomZombieAction[2] = (Random point in (Playable map area))
08-12-2008, 10:58 AM#4
dabest2503
Quote:
For Nr. 3, replace "Trigger player" with "Picked player".

I tried doing that, it still didn't work.

Quote:
The problem with the Zombies not doing Action2 is probably that your fourth trigger there runs before the first one! To fix this, just combine it all into 1 trigger:

I did that too, but it still doesn't work. The "Zombie Spawns" trigger is NOT initially enabled. It will only enable after 50 seconds of game time.
08-12-2008, 01:13 PM#5
Fireeye
It should work when it looks this way.
Trigger:
Remove unused
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked Player) slot status) Equal to Is unused
Collapse Then - Actions
Unit - Remove Survivor[(Player number of (Picked player))] from the game
Else - Actions
08-15-2008, 08:10 AM#6
dabest2503
That was the same trigger that I had, and it still doesn't remove units owned by unused players.

Has it something to do with my variables?

EDIT: I solved this question by doing this;
Trigger:
Remove unused
Collapse Events
Time - Elapsed game time is 1.00 seconds
Conditions
Collapse Actions
Collapse For each (Integer A) from 1 to 11, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player[(1 x (Integer A))] slot status) Equal to Is unused
Collapse Then - Actions
Unit - Remove Survivor[(1 x (Integer A))] from the game
Else - Actions
Help with multiple triggers.. - Wc3C.net