- Joined
- Oct 6, 2022
- Messages
- 213
Anyone Knows How to make my Trigger able to cast its spell multiple times without any problems?
-
Sword Strike
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to (Elaina) Geo Fury
-
-

Actions
-


Set SwordStrike_Caster = (Triggering unit)
-


Set SwordStrike_Caster_Point = (Target point of ability being cast)
-


Set SwordStrike_angle = (Angle from (Position of SwordStrike_Caster) to SwordStrike_Caster_Point)
-


Set SwordStrike_move_speed = 60.00
-


Set SwordStrike_cur_distance = 0.00
-


Set SwordStrike_max_distance = 1300.00
-


Set SwordStrike_Point[1] = ((Position of SwordStrike_Caster) offset by 100.00 towards ((Facing of SwordStrike_Caster) + 200.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[1] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[1] = (Last created unit)
-


Set SwordStrike_Point[2] = ((Position of SwordStrike_Caster) offset by 100.00 towards ((Facing of SwordStrike_Caster) - 200.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[2] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[2] = (Last created unit)
-


Set SwordStrike_Point[3] = ((Position of SwordStrike_Caster) offset by 100.00 towards ((Facing of SwordStrike_Caster) + 300.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[3] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[3] = (Last created unit)
-


Set SwordStrike_Point[4] = ((Position of SwordStrike_Caster) offset by 100.00 towards ((Facing of SwordStrike_Caster) - 300.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[4] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[4] = (Last created unit)
-


Set SwordStrike_Point[5] = ((Position of SwordStrike_Caster) offset by 150.00 towards ((Facing of SwordStrike_Caster) + 100.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[5] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[5] = (Last created unit)
-


Set SwordStrike_Point[6] = ((Position of SwordStrike_Caster) offset by 150.00 towards ((Facing of SwordStrike_Caster) - 100.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[6] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[6] = (Last created unit)
-


Set SwordStrike_Point[7] = ((Position of SwordStrike_Caster) offset by 50.00 towards ((Facing of SwordStrike_Caster) - 350.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[7] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[7] = (Last created unit)
-


Set SwordStrike_Point[8] = ((Position of SwordStrike_Caster) offset by 50.00 towards ((Facing of SwordStrike_Caster) + 350.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[8] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[8] = (Last created unit)
-


Set SwordStrike_Point[9] = ((Position of SwordStrike_Caster) offset by 100.00 towards ((Facing of SwordStrike_Caster) + 250.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[9] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[9] = (Last created unit)
-


Set SwordStrike_Point[10] = ((Position of SwordStrike_Caster) offset by 100.00 towards ((Facing of SwordStrike_Caster) - 250.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[10] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[10] = (Last created unit)
-


Set SwordStrike_Point[11] = ((Position of SwordStrike_Caster) offset by 150.00 towards ((Facing of SwordStrike_Caster) + 150.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[11] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[11] = (Last created unit)
-


Set SwordStrike_Point[12] = ((Position of SwordStrike_Caster) offset by 150.00 towards ((Facing of SwordStrike_Caster) - 150.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[12] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[12] = (Last created unit)
-


Set SwordStrike_Point[13] = ((Position of SwordStrike_Caster) offset by 50.00 towards ((Facing of SwordStrike_Caster) + 400.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[13] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[13] = (Last created unit)
-


Set SwordStrike_Point[14] = ((Position of SwordStrike_Caster) offset by 50.00 towards ((Facing of SwordStrike_Caster) - 400.00) degrees)
-


Unit - Create 1 Elaina Stone Dummy for (Owner of SwordStrike_Caster) at SwordStrike_Point[14] facing (Facing of SwordStrike_Caster) degrees
-


Set SwordStrike_Dummies[14] = (Last created unit)
-


For each (Integer A) from 1 to 14, do (Actions)
-



Loop - Actions
-




Unit - Turn collision for SwordStrike_Dummies[(Integer A)] Off
-
-
-


Trigger - Turn on Sword Strike Loop <gen>
-
-
-
Sword Strike Loop
-

Events
-


Time - Every 0.05 seconds of game time
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




SwordStrike_cur_distance Less than or equal to SwordStrike_max_distance
-
-



Then - Actions
-




For each (Integer A) from 1 to 14, do (Actions)
-





Loop - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Terrain pathing at (Position of SwordStrike_Dummies[(Integer A)]) of type Flyability is off) Equal to True
-
-







Then - Actions
-








Unit - Turn collision for SwordStrike_Dummies[(Integer A)] On
-








Unit - Add a 0.01 second Generic expiration timer to SwordStrike_Dummies[(Integer A)]
-
-







Else - Actions
-
-






Unit - Move SwordStrike_Dummies[(Integer A)] instantly to ((Position of SwordStrike_Dummies[(Integer A)]) offset by SwordStrike_move_speed towards SwordStrike_angle degrees), facing SwordStrike_angle degrees
-






Unit Group - Pick every unit in (Units within 75.00 of (Position of SwordStrike_Dummies[(Integer A)]) matching ((((Matching unit) belongs to an enemy of (Owner of SwordStrike_Caster)) Equal to True) and (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equa and do (Actions)
-







Loop - Actions
-








Unit - Cause SwordStrike_Dummies[(Integer A)] to damage (Picked unit), dealing (6.00 x (Real((Level of (Elaina) Geo Fury for SwordStrike_Caster)))) damage of attack type Pierce and damage type Normal
-








Unit - Interrupt (Picked unit)'s Attack
-








Unit - Create 1 Casting Dummy for (Owner of SwordStrike_Caster) at (Position of (Picked unit)) facing (Facing of (Picked unit)) degrees
-








Unit - Add (Altair) Silence to (Last created unit)
-








Unit - Set level of (Altair) Silence for (Last created unit) to (Level of (Altair) Sword Strike for SwordStrike_Caster)
-








Set SwordStrike_DummyCaster = (Last created unit)
-








Unit - Add a 1.00 second Generic expiration timer to SwordStrike_DummyCaster
-








Unit - Add a 0.05 second Generic expiration timer to SwordStrike_Dummies[(Integer A)]
-








Special Effect - Create a special effect at (Position of SwordStrike_Dummies[(Integer A)]) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-








Special Effect - Destroy (Last created special effect)
-








Unit - Order SwordStrike_Caster to Neutral Fire Lord - Soul Burn (Picked unit)
-








Unit - Remove SwordStrike_Dummies[(Integer A)] from the game
-








Trigger - Turn on Sword Strike FX loop <gen>
-
-
-
-
-




Set SwordStrike_cur_distance = (SwordStrike_cur_distance + SwordStrike_move_speed)
-
-



Else - Actions
-




Trigger - Turn off (This trigger)
-




For each (Integer A) from 1 to 14, do (Actions)
-





Loop - Actions
-






Special Effect - Create a special effect at (Position of SwordStrike_Dummies[(Integer A)]) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
-






Special Effect - Destroy (Last created special effect)
-






Unit - Remove SwordStrike_Dummies[(Integer A)] from the game
-






Set SwordStrike_Dummies[(Integer A)] = No unit
-
-
-
-
-
-


