Tenshi no aisudora
01-01-2011, 06:47 AM
I am building a map, and it is almost finished. I can release it as soon as this error is fixed. For some reason this trigger isn't setting the integer higher. I had a trigger for doing this before but it was highly unstable, and leaky. I built this new one for the newest version. I am hoping to have this released today/tomorrow.
Spawn
Events
Conditions
(Number of units in Zombies) Equal to 0
Actions
Set Zombie_Spawn[0] = (Center of Spawn TL <gen>)
Set Zombie_Spawn[1] = (Center of Spawn BL <gen>)
Set Zombie_Spawn[2] = (Center of Spawn BR <gen>)
Set Zombie_Spawn[3] = (Center of Spawn TR <gen>)
Game - Display to (All players) the text: (Wave + (String(Wave_Display)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 0
Then - Actions
Set Zombie_Check = 1
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 1
Then - Actions
Set Zombie_Check = 2
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 2
Then - Actions
Set Zombie_Check = 3
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 3
Then - Actions
Set Zombie_Check = 4
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 4
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Wave_Check Not equal to 10
Then - Actions
Set Zombie_Check = 0
Set Wave_Check = (Wave_Check + 1)
Set Wave_Check2 = (Wave_Check2 + 1)
Set Wave_Display = (Wave_Display + 1)
Else - Actions
Unit - Create 1 Zombie Furbulog for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Zombie Giant Spider for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Zombie Giant Spider for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Zombie Lizard Mutation for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Wave_Check Equal to 10
Then - Actions
Set Zombie_Check = 0
Set Wave_Check = 0
Set Wave_Display = (Wave_Display + 1)
Set Wave_Check2 = (Wave_Check2 + 1)
Unit - Create 1 Nuclear Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Nuclear Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Wave_Check2 Equal to 100
Then - Actions
Set Zombie_Check = 0
Set Wave_Check = 0
Set Wave_Check2 = 0
Set Wave_Display = (Wave_Display + 1)
Unit - Create 1 Nuclear Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
Spawn Start
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Trigger - Run Spawn <gen> (ignoring conditions)
Spawn Restart
Events
Unit - A unit Dies
Conditions
(Owner of (Dying unit)) Equal to Neutral Hostile
Actions
Unit Group - Remove (Dying unit) from Zombies
Trigger - Run Spawn <gen> (checking conditions)
Please tell me what is wrong with this script D:. I think I might be leaving out info. If you need it just say.
Spawn
Events
Conditions
(Number of units in Zombies) Equal to 0
Actions
Set Zombie_Spawn[0] = (Center of Spawn TL <gen>)
Set Zombie_Spawn[1] = (Center of Spawn BL <gen>)
Set Zombie_Spawn[2] = (Center of Spawn BR <gen>)
Set Zombie_Spawn[3] = (Center of Spawn TR <gen>)
Game - Display to (All players) the text: (Wave + (String(Wave_Display)))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 0
Then - Actions
Set Zombie_Check = 1
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Zombie for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 1
Then - Actions
Set Zombie_Check = 2
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 10 Blood Zombie for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 2
Then - Actions
Set Zombie_Check = 3
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Zombie Beetle for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 3
Then - Actions
Set Zombie_Check = 4
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 5 Fat Zombie for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Zombie_Check Equal to 4
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Wave_Check Not equal to 10
Then - Actions
Set Zombie_Check = 0
Set Wave_Check = (Wave_Check + 1)
Set Wave_Check2 = (Wave_Check2 + 1)
Set Wave_Display = (Wave_Display + 1)
Else - Actions
Unit - Create 1 Zombie Furbulog for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Zombie Giant Spider for Neutral Hostile at Zombie_Spawn[1] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Zombie Giant Spider for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Zombie Lizard Mutation for Neutral Hostile at Zombie_Spawn[3] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Wave_Check Equal to 10
Then - Actions
Set Zombie_Check = 0
Set Wave_Check = 0
Set Wave_Display = (Wave_Display + 1)
Set Wave_Check2 = (Wave_Check2 + 1)
Unit - Create 1 Nuclear Zombie for Neutral Hostile at Zombie_Spawn[0] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Unit - Create 1 Nuclear Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Wave_Check2 Equal to 100
Then - Actions
Set Zombie_Check = 0
Set Wave_Check = 0
Set Wave_Check2 = 0
Set Wave_Display = (Wave_Display + 1)
Unit - Create 1 Nuclear Zombie for Neutral Hostile at Zombie_Spawn[2] facing Default building facing degrees
Unit Group - Add (Last created unit) to Zombies
Custom script: call RemoveLocation(udg_Zombie_Spawn[0])
Custom script: call RemoveLocation(udg_Zombie_Spawn[1])
Custom script: call RemoveLocation(udg_Zombie_Spawn[2])
Custom script: call RemoveLocation(udg_Zombie_Spawn[3])
Trigger - Turn off (This trigger)
Else - Actions
Spawn Start
Events
Time - Elapsed game time is 5.00 seconds
Conditions
Actions
Trigger - Run Spawn <gen> (ignoring conditions)
Spawn Restart
Events
Unit - A unit Dies
Conditions
(Owner of (Dying unit)) Equal to Neutral Hostile
Actions
Unit Group - Remove (Dying unit) from Zombies
Trigger - Run Spawn <gen> (checking conditions)
Please tell me what is wrong with this script D:. I think I might be leaving out info. If you need it just say.