- Joined
- Apr 23, 2009
- Messages
- 94
-
Untitled Trigger 003
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
- Set InitialP1 = (Units owned by Player 1 (Red) of type Webbed One)
-
Unit Group - Pick every unit in InitialP1 and do (Actions)
-
Loop - Actions
- Set WebCaster = (Picked unit)
- Set WebCasterLoc = (Position of WebCaster)
- Set EnemyP1 = (Units within 350.00 of WebCasterLoc matching (((Owner of (Matching unit)) is an enemy of (Owner of WebCaster)) Equal to True))
-
Unit Group - Pick every unit in EnemyP1 and do (Actions)
-
Loop - Actions
- Set WebEnemy = (Position of (Picked unit))
- Set WebCasterLoc = (Position of WebCaster)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in NumberUnits) Less than (Number of units in (Units within 350.00 of WebCasterLoc matching (((Owner of (Matching unit)) is an enemy of (Owner of WebCaster)) Equal to True)))
-
Then - Actions
- Unit - Create 1 Explode for Player 1 (Red) at WebCasterLoc facing Default building facing degrees
- Unit - Order (Last created unit) to Neutral Dark Ranger - Life Drain (Picked unit)
- Unit Group - Add (Picked unit) to NumberUnits
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between WebEnemy and WebCasterLoc) Less than or equal to 45.00
-
Then - Actions
- Custom script: call RemoveLocation(udg_WebEnemy)
- Custom script: call RemoveLocation(udg_WebCasterLoc)
-
Else - Actions
- Unit - Move (Picked unit) instantly to (WebEnemy offset by 2.00 towards (Angle from WebEnemy to WebCasterLoc) degrees), facing Default building facing degrees
- Custom script: call RemoveLocation(udg_WebEnemy)
- Custom script: call RemoveLocation(udg_WebCasterLoc)
-
If - Conditions
-
Loop - Actions
-
Loop - Actions
- Custom script: call DestroyGroup(udg_InitialP1)
- Custom script: call DestroyGroup(udg_EnemyP1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (WebCaster is dead) Equal to True
-
Then - Actions
- Custom script: call DestroyGroup(udg_InitialP1)
- Custom script: call DestroyGroup(udg_EnemyP1)
- Custom script: call RemoveLocation(udg_WebEnemy)
- Custom script: call RemoveLocation(udg_WebCasterLoc)
- Trigger - Turn off (This trigger)
-
Else - Actions
- Do nothing
-
If - Conditions
-
Events
You cast a spell, this trigger is turned on.
They all move where they need to, but the units created that cast Drain Life only do it like 75% of the time.. Sometimes it seems random. They ALWAYS do it the first time, but after that it gets sporadic.
What am i overlooking?