- Joined
- Jul 21, 2019
- Messages
- 177
Hello, i have a problem with a triggered ability i'm trying to make, i watched a tutorial on YouTube about how to make a dash ability, everything good, my unit dashes just fine, but then i wanted to make the dash deal damage to units hit, so i modified the trigger with what i thought would work, but it damages enemies multiple times instead of once, this is a huge problem because the ability is massively overpowered and one shots everything under 500 hp.
Here are the triggers:
(I think the problem is that it repeatedly deals the intended damage every 0.05 seconds right?)
And a video:
Please note that i am just learning to make triggered spells, i'm surprised i even managed to make it work!
Here are the triggers:
-
SS Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Spinning Slash
-
-
Actions
-
Set SS_Caster = (Triggering unit)
-
Set SS_Point[0] = (Position of SS_Caster)
-
Set SS_Point[1] = (Target point of ability being cast)
-
Set SS_Distance = (Distance between (Position of SS_Caster) and SS_Point[1])
-
Set SS_Increment = 70.00
-
Set SS_Angle = (Angle from (Position of SS_Caster) to SS_Point[1])
-
Set SS_Damage = (75 x (Level of Spinning Slash for SS_Caster))
-
Sound - Play Spinning_Slash <gen> at 100.00% volume, attached to (Triggering unit)
-
Unit - Pause SS_Caster
-
Animation - Play SS_Caster's spin animation
-
Unit - Turn collision for SS_Caster Off
-
Trigger - Turn on SS Loop <gen>
-
-
-
SS Loop
-
Events
-
Time - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Set SS_Distance = (SS_Distance - SS_Increment)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
SS_Distance Greater than 0.00
-
-
Then - Actions
-
Set SS_Group = (Units within 150.00 of SS_Point[2] matching (((Matching unit) belongs to an enemy of (Owner of SS_Caster)) Equal to True))
-
Set SS_Point[2] = (Position of SS_Caster)
-
Set SS_Point[3] = (SS_Point[2] offset by SS_Increment towards SS_Angle degrees)
-
Unit - Move SS_Caster instantly to SS_Point[3]
-
Unit Group - Pick every unit in SS_Group and do (Actions)
-
Loop - Actions
-
Unit - Cause SS_Caster to damage (Picked unit), dealing (Real(SS_Damage)) damage of attack type Spells and damage type Normal
-
Unit Group - Remove all units from SS_Group
-
-
-
-
Else - Actions
-
-
-
-
SS Stop
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Spinning Slash
-
-
Actions
-
Wait 0.40 game-time seconds
-
Unit - Unpause SS_Caster
-
Animation - Reset SS_Caster's animation
-
Unit - Turn collision for SS_Caster On
-
-
(I think the problem is that it repeatedly deals the intended damage every 0.05 seconds right?)
And a video:
Please note that i am just learning to make triggered spells, i'm surprised i even managed to make it work!