Never_Quit
New Member
- Reaction score
- 16
im creating a jump kill ability and it either goes too fast or too slow. does anyone know how to fix this problem?
for reference here's my code so far (just started)
EDIT: if i add a wait within the loop of 0 or anything around that then it will take about .1 seconds to run each loop
for reference here's my code so far (just started)
Trigger:
- Melee Initialization
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Flame Strike
- Actions
- Set distance = (Integer((Distance between (Position of (Triggering unit)) and (Target point of ability being cast))))
- Game - Display to (All players) the text: (String(distance))
- Unit - Make (Triggering unit) face (Target point of ability being cast) over 0.50 seconds
- Set startingangle = (Angle from (Position of (Triggering unit)) to (Target point of ability being cast))
- Set startingx = (X of (Position of (Triggering unit)))
- Set startingy = (Y of (Position of (Triggering unit)))
- Wait 1.00 seconds
- For each (Integer A) from 1 to distance, do (Actions)
- Loop - Actions
- Unit - Move (Triggering unit) instantly to ((Point(startingx, startingy)) offset by (Real((Integer A))) towards startingangle degrees)
- Loop - Actions
- Events
EDIT: if i add a wait within the loop of 0 or anything around that then it will take about .1 seconds to run each loop