Tawnttoo
New Member
- Reaction score
- 36
Why is the animation not work on this? It sort of starts the animation all over again each time the trigger runs. The result is bizarre skittering, not what I'm looking for.
Everything else works just fine, so that it can't be about not setting the variables right.
Trigger:
- ChargeLoop
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in Charge_Chargers and do (Actions)
- Loop - Actions
- Hashtable - Save Handle Of(Position of (Picked unit)) as (Key chargerloc) of (Key (Picked unit)) in Charge_Hash
- Hashtable - Save Handle Of(Position of (Load (Key target) of (Key (Picked unit)) in Charge_Hash)) as (Key targetloc) of (Key (Picked unit)) in Charge_Hash
- Hashtable - Save Handle Of((Load (Key chargerloc) of (Key (Picked unit)) in Charge_Hash) offset by (Load (Key speed) of (Key (Picked unit)) from Charge_Hash) towards (Angle from (Load (Key chargerloc) of (Key (Picked unit)) in Charge_Hash) to (Load (Key targetloc) of (Key (Picked unit as (Key TempPoint) of (Key (Picked unit)) in Charge_Hash
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between (Load (Key chargerloc) of (Key (Picked unit)) in Charge_Hash) and (Load (Key targetloc) of (Key (Picked unit)) in Charge_Hash)) Less than or equal to 90.00
- Then - Actions
- Unit - Create 1 Dummy for (Owner of (Picked unit)) at (Load (Key chargerloc) of (Key (Picked unit)) in Charge_Hash) facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Add Firebolt (Neutral Hostile) to (Last created unit)
- Unit - Order (Last created unit) to Neutral - Firebolt (Load (Key target) of (Key (Picked unit)) in Charge_Hash)
- Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
- Unit - Turn collision for (Picked unit) On
- Animation - Reset (Picked unit)'s animation
- Unit Group - Remove (Picked unit) from Charge_Chargers
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Charge_Hash
- Else - Actions
- Hashtable - Save (X of (Load (Key TempPoint) of (Key (Picked unit)) in Charge_Hash)) as (Key X) of (Key (Picked unit)) in Charge_Hash
- Hashtable - Save (Y of (Load (Key TempPoint) of (Key (Picked unit)) in Charge_Hash)) as (Key Y) of (Key (Picked unit)) in Charge_Hash
- Special Effect - Create a special effect at (Load (Key TempPoint) of (Key (Picked unit)) in Charge_Hash) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call SetUnitAnimationByIndex( GetEnumUnit(), 1)
- Custom script: call SetUnitX( GetEnumUnit(), LoadRealBJ(StringHashBJ("X"), GetHandleIdBJ(GetEnumUnit()), udg_Charge_Hash) )
- Custom script: call SetUnitY( GetEnumUnit(), LoadRealBJ(StringHashBJ("Y"), GetHandleIdBJ(GetEnumUnit()), udg_Charge_Hash) )
- If - Conditions
- Loop - Actions
- Unit Group - Pick every unit in Charge_Chargers and do (Actions)
- Events
Everything else works just fine, so that it can't be about not setting the variables right.