LordSaddler1
New Member
- Reaction score
- 4
I wanted to make my own attempt at a leap spell, and its all messed up. It doesnt increase flying animation, moves super slow, only goes about 1/2 the way. Plz. don't say, "Go copy the jump templates from the website!". I want to attempt this to help my understanding of triggers and basics.
Code:
Leaping Bound
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Leaping Bound
Actions
Set LB_Caster = (Triggering unit)
Set LB_Point = (Target point of ability being cast)
Set LB_Distance = ((Integer((Distance between (Position of LB_Caster) and LB_Point))) + 0)
Unit - Add classification of A flying unit to LB_Caster
For each (Integer A) from 1 to (LB_Distance / 50), do (Actions)
Loop - Actions
Unit - Pause LB_Caster
Unit - Move LB_Caster instantly to ((Position of LB_Caster) offset by ((Distance between (Position of LB_Caster) and LB_Point) / 50.00) towards (Angle from (Position of LB_Caster) to LB_Point) degrees)
Wait 0.01 seconds
Animation - Change LB_Caster flying height to ((Default flying height of LB_Caster) + 20.00) at 0.00
Unit - Unpause LB_Caster
Wait 0.01 seconds
Animation - Change LB_Caster flying height to (Default flying height of LB_Caster) at 0.00
Unit - Remove classification of A flying unit from LB_Caster