- Joined
- Feb 28, 2013
- Messages
- 1,898
Hallo, I would like to ask why my triggers don't kill the picked units at the Third (see comment "Third") batch, I literally did the same thing every batch but with different distances and count but there seem to be an issue with Unit Groups I just can't figure out where I did go wrong. I will really appreciate a help. 
Additional Notes:
• At Second batch (see comment "Second") the Battle Wall dies, but when the trigger is at the Third batch the Battle Wall no longer dies, same goes to Fourth and Last batch.
• Ignore the Lightnings not getting removed.
Additional Notes:
• At Second batch (see comment "Second") the Battle Wall dies, but when the trigger is at the Third batch the Battle Wall no longer dies, same goes to Fourth and Last batch.
• Ignore the Lightnings not getting removed.
-
Dev Battle Wall Test
-
Events
-
Time - Elapsed game time is 1.00 seconds
-
-
Conditions
-
Actions
-
Camera - Pan camera for Player 1 (Red) to (Position of Dummy - General Use 0201 <gen>) over 0.00 seconds
-
Wait 2.00 seconds
-
-------- --------
-
-------- Second --------
-
Cinematic - Ping minimap for (All players) at (Position of Dummy - General Use 0201 <gen>) for 5.00 seconds, using a Warning ping of color (100.00%, 75.00%, 50.00%)
-
Set Around_Real = 0.00
-
Set Around_FirstUnit = No unit
-
Set Around_PreviousUnit = No unit
-
For each (Integer A) from 1 to 96, do (Actions)
-
Loop - Actions
-
-------- --------
-
-------- Create unit for unit group --------
-
Unit - Create 1 Battle Wall for Neutral Passive at ((Position of Dummy - General Use 0201 <gen>) offset by 16384.00 towards Around_Real degrees) facing Default building facing degrees
-
Unit Group - Add (Last created unit) to Around_UnitGroup
-
-------- --------
-
-------- Get the first unit so we can connect the first unit to the last unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 1
-
-
Then - Actions
-
Set Around_FirstUnit = (Last created unit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Create lightning if there are two units possible --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Around_PreviousUnit Not equal to No unit
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_PreviousUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Now we check if we're at the last unit so we can connect the lightning to the first unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 96
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_FirstUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
Set Around_PreviousUnit = (Last created unit)
-
-------- --------
-
-------- Distance between tall walls --------
-
Set Around_Real = (Around_Real + 3.75)
-
-
-
Wait 5.00 seconds
-
-------- --------
-
-------- Kill the units --------
-
Unit Group - Pick every unit in Around_UnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Kill (Picked unit)
-
-
-
Unit Group - Remove all units from Around_UnitGroup
-
Custom script: call DestroyGroup(udg_Around_UnitGroup)
-
Wait 1.00 seconds
-
-------- --------
-
-------- Third --------
-
Cinematic - Ping minimap for (All players) at (Position of Dummy - General Use 0201 <gen>) for 5.00 seconds, using a Warning ping of color (100.00%, 75.00%, 50.00%)
-
Set Around_Real = 0.00
-
Set Around_FirstUnit = No unit
-
Set Around_PreviousUnit = No unit
-
For each (Integer A) from 1 to 48, do (Actions)
-
Loop - Actions
-
-------- --------
-
-------- Create unit for unit group --------
-
Unit - Create 1 Battle Wall for Neutral Passive at ((Position of Dummy - General Use 0201 <gen>) offset by 8192.00 towards Around_Real degrees) facing Default building facing degrees
-
Unit Group - Add (Last created unit) to Around_UnitGroup
-
-------- --------
-
-------- Get the first unit so we can connect the first unit to the last unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 1
-
-
Then - Actions
-
Set Around_FirstUnit = (Last created unit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Create lightning if there are two units possible --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Around_PreviousUnit Not equal to No unit
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_PreviousUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Now we check if we're at the last unit so we can connect the lightning to the first unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 48
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_FirstUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
Set Around_PreviousUnit = (Last created unit)
-
-------- --------
-
-------- Distance between tall walls --------
-
Set Around_Real = (Around_Real + 7.50)
-
-
-
Wait 5.00 seconds
-
-------- --------
-
-------- Kill the units --------
-
Unit Group - Pick every unit in Around_UnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Kill (Picked unit)
-
-
-
Unit Group - Remove all units from Around_UnitGroup
-
Custom script: call DestroyGroup(udg_Around_UnitGroup)
-
Wait 1.00 seconds
-
-------- --------
-
-------- Fourth --------
-
Cinematic - Ping minimap for (All players) at (Position of Dummy - General Use 0201 <gen>) for 5.00 seconds, using a Warning ping of color (100.00%, 75.00%, 50.00%)
-
Set Around_Real = 0.00
-
Set Around_FirstUnit = No unit
-
Set Around_PreviousUnit = No unit
-
For each (Integer A) from 1 to 24, do (Actions)
-
Loop - Actions
-
-------- --------
-
-------- Create unit for unit group --------
-
Unit - Create 1 Battle Wall for Neutral Passive at ((Position of Dummy - General Use 0201 <gen>) offset by 4096.00 towards Around_Real degrees) facing Default building facing degrees
-
Unit Group - Add (Last created unit) to Around_UnitGroup
-
-------- --------
-
-------- Get the first unit so we can connect the first unit to the last unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 1
-
-
Then - Actions
-
Set Around_FirstUnit = (Last created unit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Create lightning if there are two units possible --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Around_PreviousUnit Not equal to No unit
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_PreviousUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Now we check if we're at the last unit so we can connect the lightning to the first unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 24
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_FirstUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
Set Around_PreviousUnit = (Last created unit)
-
-------- --------
-
-------- Distance between tall walls --------
-
Set Around_Real = (Around_Real + 15.00)
-
-
-
Wait 5.00 seconds
-
-------- --------
-
-------- Kill the units --------
-
Unit Group - Pick every unit in Around_UnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Kill (Picked unit)
-
-
-
Unit Group - Remove all units from Around_UnitGroup
-
Custom script: call DestroyGroup(udg_Around_UnitGroup)
-
Wait 1.00 seconds
-
-------- --------
-
-------- Last Circle --------
-
Cinematic - Ping minimap for (All players) at (Position of Dummy - General Use 0201 <gen>) for 5.00 seconds, using a Warning ping of color (100.00%, 75.00%, 50.00%)
-
Set Around_Real = 0.00
-
Set Around_FirstUnit = No unit
-
Set Around_PreviousUnit = No unit
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
-------- --------
-
-------- Create unit for unit group --------
-
Unit - Create 1 Battle Wall for Neutral Passive at ((Position of Dummy - General Use 0201 <gen>) offset by 2048.00 towards Around_Real degrees) facing Default building facing degrees
-
Unit Group - Add (Last created unit) to Around_UnitGroup
-
-------- --------
-
-------- Get the first unit so we can connect the first unit to the last unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 1
-
-
Then - Actions
-
Set Around_FirstUnit = (Last created unit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Create lightning if there are two units possible --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Around_PreviousUnit Not equal to No unit
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_PreviousUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
-------- --------
-
-------- Now we check if we're at the last unit so we can connect the lightning to the first unit --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer A) Equal to 12
-
-
Then - Actions
-
Lightning - Create a Lightning Attack lightning effect from source (Position of (Last created unit)) to target (Position of Around_FirstUnit)
-
-
Else - Actions
-
Do nothing
-
-
-
Set Around_PreviousUnit = (Last created unit)
-
-------- --------
-
-------- Distance between tall walls --------
-
Set Around_Real = (Around_Real + 30.00)
-
-
-
Wait 10.00 seconds
-
-------- --------
-
-------- Kill the units --------
-
Unit Group - Pick every unit in Around_UnitGroup and do (Actions)
-
Loop - Actions
-
Unit - Kill (Picked unit)
-
-
-
Unit Group - Remove all units from Around_UnitGroup
-
Custom script: call DestroyGroup(udg_Around_UnitGroup)
-
-
Last edited: