Nathan0093
New Member
- Reaction score
- 4
Hey all. I'm trying to make a Charge ability for a Knight unit. When a point is targeted with this ability, the Knight will move toward that point damaging everything that he ran through. His collision will be off while he is moving. Does anyone know how to best trigger this ability? The charge effect is basically immolation. That is what I used to deal the damage while moving. Suggestions? I also cant seem to find a way to check if the Knight is done charging or not.
Code:
Untitled Trigger 001
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to (==) Charge (Run)
Actions
Unit - Turn collision for (Triggering unit) Off
Set TempPoint = (Position of (Triggering unit))
Unit - Order (Triggering unit) to Move To (Target point of ability being cast)
Unit - Add Charge Effect (Neutral Hostile 1) to (Triggering unit)
Wait until (((X of TempPoint) Equal to (==) (X of (Target point of ability being cast))) and ((Y of TempPoint) Equal to (==) (Y of (Target point of ability being cast)))), checking every 0.50 seconds
Unit - Remove Charge Effect (Neutral Hostile 1) from (Triggering unit)
Unit - Turn collision for (Triggering unit) On
Custom script: call RemoveLocation(udg_TempPoint)