It works the first time but the second time the units just stay there. Any idea? Edit:Removing DestroyGroup works everytime but leaks.
-
Spawn
-
Events
- Time - Every 30.00 seconds of game time
- Conditions
-
Actions
-
For each (Integer tempintegers[1]) from 1 to 2, do (Actions)
-
Loop - Actions
- Set temppoint[tempintegers[1]] = (Center of castlespawnreg[tempintegers[1]])
- Set temppoint2[tempintegers[1]] = (Center of attackcastle[tempintegers[1]])
- Unit - Create 4 templarforces[1] for players[tempintegers[1]] at temppoint[tempintegers[1]] facing Default building facing degrees
- Unit - Create 2 templarforces[2] for players[tempintegers[1]] at temppoint[tempintegers[1]] facing Default building facing degrees
- Unit - Create 1 templarforces[(Random integer number between 3 and 4)] for players[tempintegers[1]] at temppoint[tempintegers[1]] facing Default building facing degrees
-
For each (Integer tempintegers[2]) from 1 to 8, do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by players[tempintegers[1]] of type templarforces[tempintegers[2]]) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to tempgroup[tempintegers[1]]
-
Loop - Actions
-
Unit Group - Pick every unit in (Units owned by players[tempintegers[1]] of type templarforces[tempintegers[2]]) and do (Actions)
-
Loop - Actions
- Unit Group - Order tempgroup[tempintegers[1]] to Attack-Move To temppoint2[tempintegers[1]]
- Custom script: call RemoveLocation(udg_temppoint[udg_tempintegers[1]])
- Custom script: call RemoveLocation(udg_temppoint2[udg_tempintegers[1]])
- Custom script: call DestroyGroup(udg_tempgroup[udg_tempintegers[1]])
-
Loop - Actions
-
For each (Integer tempintegers[1]) from 1 to 2, do (Actions)
-
Events
Last edited: