- Joined
- Apr 19, 2011
- Messages
- 1,331
I tried to do a simple Charge spell using Hashtables, but the problem is that at end the targeted unit is stunned multiple times. And i don't understand why it cast thunder bolt multiple times.
There are the triggers :
There are the triggers :
-
Charge init
-
Evénements
-
Map initialization
-
-
Conditions
-
Actions
-
Table de hachage - Create a hashtable
-
Set Charge_Targets = (Last created hashtable)
-
-
-
Charge cast
-
Evénements
-
Unité - A unit Initie l'effet d'une compétence
-
-
Conditions
-
Actions
-
Groupe unité - Add (Triggering unit) to Charge_Casters
-
Table de hachage - Save Handle Of(Target unit of ability being cast) as 0 of (Key (Triggering unit)) in Charge_Targets
-
Unité - Turn collision for (Triggering unit) Off
-
Déclencheur - Turn on Charge loop <gen>
-
-
-
Charge loop
-
Evénements
-
Temps - Every 0.05 seconds of game time
-
-
Conditions
-
Actions
-
Groupe unité - Pick every unit in Charge_Casters and do (Actions)
-
Boucle - Actions
-
Set Charge_Point = (Position of (Picked unit))
-
Set Charge_Point2 = (Position of (Load 0 of (Key (Picked unit)) in Charge_Targets))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
(Distance between Charge_Point and Charge_Point2) Supérieur à 50.00
-
-
Alors - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
((Load 0 of (Key (Picked unit)) in Charge_Targets) is Insensible à la magie) Egal à FALSE
-
((Load 0 of (Key (Picked unit)) in Charge_Targets) has buff Invulnérable) Egal à FALSE
-
((Load 0 of (Key (Picked unit)) in Charge_Targets) is dead) Egal à FALSE
-
((Picked unit) is dead) Egal à FALSE
-
((Load 0 of (Key (Picked unit)) in Charge_Targets) is hidden) Egal à FALSE
-
((Load 0 of (Key (Picked unit)) in Charge_Targets) is visible to (Owner of (Picked unit))) Egal à TRUE
-
((Load 0 of (Key (Picked unit)) in Charge_Targets) is fogged to (Owner of (Picked unit))) Egal à FALSE
-
((Load 0 of (Key (Picked unit)) in Charge_Targets) is masked to (Owner of (Picked unit))) Egal à FALSE
-
-
Alors - Actions
-
Set Charge_Point3 = (Charge_Point offset by 22.50 towards (Angle from Charge_Point to Charge_Point2) degrees)
-
Unité - Move (Picked unit) instantly to Charge_Point3, facing Charge_Point2
-
Custom script: call RemoveLocation( udg_Charge_Point3 )
-
-
Sinon - Actions
-
Unité - Turn collision for (Picked unit) On
-
Groupe unité - Remove (Picked unit) from Charge_Casters
-
Table de hachage - Clear all child hashtables of child (Key (Picked unit)) in Charge_Targets
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
(Charge_Casters is empty) Egal à TRUE
-
-
Alors - Actions
-
Déclencheur - Turn off (This trigger)
-
-
Sinon - Actions
-
-
-
-
-
Sinon - Actions
-
Unité - Turn collision for (Picked unit) On
-
Groupe unité - Remove (Picked unit) from Charge_Casters
-
Unité - Create 1 Charge Dummy for (Owner of (Picked unit)) at Charge_Point2 facing Charge_Point2
-
Unité - Set level of Charge Stun for (Last created unit) to (Level of Charge for (Picked unit))
-
Unité - Order (Last created unit) to Roi de la montagne humain - Boule de foudre (Load 0 of (Key (Picked unit)) in Charge_Targets)
-
Unité - Add a 1.00 second Générique expiration timer to (Last created unit)
-
Unité - Order (Picked unit) to Attaquer (Load 0 of (Key (Picked unit)) in Charge_Targets)
-
Table de hachage - Clear all child hashtables of child (Key (Picked unit)) in Charge_Targets
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Si - Conditions
-
(Charge_Casters is empty) Egal à TRUE
-
-
Alors - Actions
-
Déclencheur - Turn off (This trigger)
-
-
Sinon - Actions
-
-
-
-
Custom script: call RemoveLocation( udg_Charge_Point )
-
Custom script: call RemoveLocation( udg_Charge_Point2 )
-
-
-
-