- Joined
- Dec 31, 2014
- Messages
- 68
Hello all, this is kinda object/trigger related.
I watched a video on youtube of how to make a simple dash ability which uses shockwave as a base spell, then to target a point and have the unit instantly move-in-increments to the target, to use in my map. I don't want something like Blink as I have some locked doors etc which the Blinkers could teleport over.
I managed to get the simple dash to work but I would like to make it so that the unit can target anywhere in their view and to do the ability from the casting units position, but at a certain distance they cannot 'Dash' any further. (Blink has this sort of setup I believe)
Heres an image of what I would like to do;
So the Unit uses Dash from their position on the left, targets where the target is, but I want it to stop at a certain distance (Middle).
These are the triggers that the tutorial suggested; There are likely some trigger issues here also so if there are can you please let me know how to fix them, or any alternatives.
Variables;
Angle - Real
Caster - Unit
DashPoint - Point Array(3)
Distance - Real
Increment - Real
Here is the video for reference.https://www.youtube.com/watch?v=Wal2c6NQGIU
Thanks
I watched a video on youtube of how to make a simple dash ability which uses shockwave as a base spell, then to target a point and have the unit instantly move-in-increments to the target, to use in my map. I don't want something like Blink as I have some locked doors etc which the Blinkers could teleport over.
I managed to get the simple dash to work but I would like to make it so that the unit can target anywhere in their view and to do the ability from the casting units position, but at a certain distance they cannot 'Dash' any further. (Blink has this sort of setup I believe)
Heres an image of what I would like to do;
So the Unit uses Dash from their position on the left, targets where the target is, but I want it to stop at a certain distance (Middle).
These are the triggers that the tutorial suggested; There are likely some trigger issues here also so if there are can you please let me know how to fix them, or any alternatives.
Variables;
Angle - Real
Caster - Unit
DashPoint - Point Array(3)
Distance - Real
Increment - Real
-
Dash Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Dash
-
Actions
- Set Caster = (Triggering unit)
- Set DashPoint[0] = (Position of Caster)
- Set DashPoint[1] = (Target point of ability being cast)
- Set Distance = (Distance between (Position of Caster) and DashPoint[1])
- Set Increment = 50.00
- Set Angle = (Angle from (Position of Caster) to DashPoint[1])
- Trigger - Turn on Dash Loop <gen>
-
Events
-
Dash Loop
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
- Set Distance = (Distance - Increment)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Distance Greater than 0.00
-
Then - Actions
- Set DashPoint[2] = (Position of Caster)
- Set DashPoint[3] = (DashPoint[2] offset by Increment towards Angle degrees)
- Unit - Set mana of Caster to 0.00
- Unit - Move Caster instantly to DashPoint[3]
- Else - Actions
-
If - Conditions
-
Events
Here is the video for reference.https://www.youtube.com/watch?v=Wal2c6NQGIU
Thanks