- Joined
- Oct 4, 2011
- Messages
- 226
Hello, I have started a Maze project recently. I have tried making my own system so that any unit not owned by player 12 (besides footmen) are killed if they are (128, 12 in range of any of player 12's matching units. I add in conditions because I am going to have certain units that you are allowed to touch where as others will kill you if you get hit by them. It seems to work on one of the player 12 units that I have but some others dont register.
-
Mazer death1
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
- Set DeathGroup1 = (Units owned by Player 12 (Brown) matching (((Unit-type of (Matching unit)) Not equal to Footman) and (((Matching unit) is A structure) Equal to False)))
-
Unit Group - Pick every unit in DeathGroup1 and do (Actions)
-
Loop - Actions
- Set TempUnit = (Picked unit)
- Set TempLocation = (Position of TempUnit)
- Unit Group - Remove TempUnit from DeathGroup1
- Set DeathGroup2 = (Units within 128.00 of TempLocation matching (((Unit-type of (Matching unit)) Not equal to Footman) and ((Owner of (Matching unit)) Not equal to Player 12 (Brown))))
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TempLocation)
-
Unit Group - Pick every unit in DeathGroup2 and do (Actions)
-
Loop - Actions
- Set TempUnit2 = (Picked unit)
- Unit - Kill TempUnit2
- Unit Group - Remove TempUnit2 from DeathGroup2
-
Loop - Actions
-
Events