- Joined
- Apr 4, 2011
- Messages
- 995
I can't find where it goes wrong, but here's what it's supposed to do, and what it actually does.
The spell is an Aoe stomp, and when cast, all units are "dazed". Dazed units have 60% movement speed for 3/5/7 seconds, and if they take 75/150/225 damage they lose the movement speed slow before the timer expires. Something weird is happening, because the timer never expires. Moreover, the movement speed reduction isn't working at all, and the damage is. They're both in the same block of the [then] statement. Here are triggers
Just in case you're wondering, the hashtable values 20 and up are used for a universal knockback trigger I have between all my spells.
The spell is an Aoe stomp, and when cast, all units are "dazed". Dazed units have 60% movement speed for 3/5/7 seconds, and if they take 75/150/225 damage they lose the movement speed slow before the timer expires. Something weird is happening, because the timer never expires. Moreover, the movement speed reduction isn't working at all, and the damage is. They're both in the same block of the [then] statement. Here are triggers
-
Tauren Smash Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Tauren Smash
-
Actions
- Set TS_Caster = (Triggering unit)
- Set TS_Point1 = (Position of TS_Caster)
- Set TS_Level = (Level of Tauren Smash for TS_Caster)
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 300.00 of TS_Point1 matching ((((Matching unit) belongs to an enemy of (Owner of TS_Caster)) Equal to True) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is and do (Actions)
-
Loop - Actions
- Set Beast_Knockbackunit = (Picked unit)
- Set TS_Point2 = (Position of Beast_Knockbackunit)
- Custom script: set udg_Beast_Handle = GetHandleId(udg_Beast_Knockbackunit)
- Unit Group - Add Beast_Knockbackunit to Beast_Knockbackgroup
- Unit Group - Add Beast_Knockbackunit to TS_Group
- Unit - Turn collision for Beast_Knockbackunit Off
- Unit - Cause TS_Caster to damage Beast_Knockbackunit, dealing TS_Damage[TS_Level] damage of attack type Spells and damage type Normal
- Unit - Set Beast_Knockbackunit movement speed to (0.40 x (Default movement speed of Beast_Knockbackunit))
- Special Effect - Create a special effect attached to the overhead of Beast_Knockbackunit using Abilities\Spells\Orc\StasisTrap\StasisTotemTarget.mdl
- Hashtable - Save Handle Of(Last created special effect) as 9 of Beast_Handle in Beastkin_Hash
- Set TS_Health = ((Life of (Triggering unit)) x (50.00 x (Real(TS_Level))))
- Set TS_Timer = (1.00 + (2.00 x (Real(TS_Level))))
- Hashtable - Save TS_Health as 6 of Beast_Handle in Beastkin_Hash
- Hashtable - Save TS_Timer as 7 of Beast_Handle in Beastkin_Hash
- Hashtable - Save TS_Level as 8 of Beast_Handle in Beastkin_Hash
- Set Beast_Knockbacktimer = 1.20
- Set Beast_Angle = (Angle from TS_Point1 to TS_Point2)
- Set Beast_Distance = 30.00
- Set Beast_Slidedistance = (300.00 - (Distance between TS_Point1 and TS_Point2))
- Hashtable - Save Beast_Knockbacktimer as 20 of Beast_Handle in Beastkin_Hash
- Hashtable - Save Beast_Angle as 21 of Beast_Handle in Beastkin_Hash
- Hashtable - Save Beast_Distance as 22 of Beast_Handle in Beastkin_Hash
- Hashtable - Save (Beast_Slidedistance / 8.00) as 23 of Beast_Handle in Beastkin_Hash
- Set TS_Loops = (TS_Loops + 1)
- Custom script: call RemoveLocation(udg_TS_Point2)
- Trigger - Turn on Tauren Smash Damage Check <gen>
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TS_Point1)
- Set KnockbackLoops = (KnockbackLoops + 1)
- Trigger - Turn on Knockback <gen>
-
Events
-
Tauren Smash Damage Check
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in TS_Group and do (Actions)
-
Loop - Actions
- Set Beast_Knockbackunit = (Picked unit)
- Custom script: set udg_Beast_Handle = GetHandleId(udg_Beast_Knockbackunit)
- Set TS_Timer = (Load 7 of Beast_Handle from Beastkin_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TS_Timer Not equal to 0.00
-
Then - Actions
- Set TS_Health = (Load 6 of Beast_Handle from Beastkin_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TS_Health Less than or equal to (Life of Beast_Knockbackunit)
-
Then - Actions
- Hashtable - Clear all child hashtables of child TS_Handle in Beastkin_Hash
- Unit - Set Beast_Knockbackunit movement speed to (Default movement speed of Beast_Knockbackunit)
- Unit Group - Remove Beast_Knockbackunit from TS_Group
- Set TS_Loops = (TS_Loops - 1)
- Special Effect - Destroy (Load 9 of Beast_Handle in Beastkin_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TS_Loops Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Hashtable - Save (TS_Timer - 0.10) as 7 of Beast_Handle in Beastkin_Hash
-
Else - Actions
- Hashtable - Clear all child hashtables of child Beast_Handle in Beastkin_Hash
- Unit - Set Beast_Knockbackunit movement speed to (Default movement speed of Beast_Knockbackunit)
- Unit Group - Remove Beast_Knockbackunit from TS_Group
- Set TS_Loops = (TS_Loops - 1)
- Special Effect - Destroy (Load 9 of Beast_Handle in Beastkin_Hash)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- TS_Loops Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in TS_Group and do (Actions)
-
Events