- Joined
- Aug 1, 2008
- Messages
- 453
Right now im am trying to make a unit tower that will go to, and attack all units within 300 of the base tower. Heres my setup triggger
-
Soldier Tower set up
-

Events
-


Unit - A unit Finishes construction
-
-

Conditions
-


(Unit-type of (Constructed structure)) Equal to |cffBB9910Lv. 1 Soldier (Base)
-
-

Actions
-


Wait 0.10 seconds
-


Unit - Create 1 Lv. 1 Soldier (NEW) for (Owner of (Constructed structure)) at (Position of (Constructed structure)) facing Default building facing degrees
-


Set Customvalue[1] = (Customvalue[1] + 2)
-


Set Customvalue[2] = (Point-value of (Unit-type of (Last created unit)))
-


Unit - Set the custom value of (Last created unit) to (Customvalue[1] - 1)
-


Unit - Set the custom value of (Constructed structure) to (Customvalue[1] + 0)
-


Wait 0.10 seconds
-


Unit - Move (Last created unit) instantly to (Center of (Region centered at (Position of (Constructed structure)) with size (1.00, 1.00)))
-
-
-
Soldier Tower Attacking
-

Events
-


Unit - A unit Is issued an order targeting an object
-
-

Conditions
-


(Unit-type of (Attacking unit)) Equal to Lv. 1 Soldier (NEW)
-
-

Actions
-


Set Temp_Interger = ((Custom value of (Attacking unit)) + 1)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Region centered at Positionoftower[Temp_Interger] with size (150.00, 150.00)) contains (Position of (Attacked unit))) Equal to True
-
-



Then - Actions
-




Set Positionoftower[Temp_Interger] = (Position of (Attacking unit))
-




Set Positionofenemy[(Custom value of (Attacking unit))] = (Position of (Attacked unit))
-




Unit - Move (Attacking unit) instantly to Positionofenemy[(Custom value of (Attacking unit))]
-
-



Else - Actions
-




Unit - Order (Triggering unit) to Move To Positionoftower[((Custom value of (Triggering unit)) + 1)]
-
-
-
-


