- Joined
- Feb 15, 2013
- Messages
- 372
Guys can anyone explain why do this doesn't knockback? o.0 I'm trying to use hashtable but I'm not so talented at hash..... Thanks
[trigger="Heavy Strike"]Heavy Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Heavy Strike
Actions
Set HeavyStrikeUnit = (Triggering unit)
Set HeavyStrikeTarget = (Target unit of ability being cast)
Set HeavyStrikeDamage = 7.30
Set HeavyStrikeTimer = 2.00
Hashtable - Save HeavyStrikeDamage as 0 of 0 in HeavyStrikeHash
Hashtable - Save HeavyStrikeTimer as 1 of 0 in HeavyStrikeHash
Unit Group - Add HeavyStrikeTarget to HeavyStrikeGroup
Trigger - Turn on Heavy Strike Knockback <gen>[/trigger]
[trigger="Heavy Strike Knockback"]Heavy Strike Knockback
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in HeavyStrikeGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
HeavyStrikeTimer Equal to 0.00
Then - Actions
Set HeavyStrikeTarget = (Target unit of ability being cast)
Set HeavyStrikeDamage = (Load 0 of 0 from HeavyStrikeHash)
Set HeavyStrikeTimer = (Load 1 of 0 from HeavyStrikeHash)
Set HeavyStrikeLoc = ((Position of HeavyStrikeTarget) offset by (Facing of HeavyStrikeTarget) towards (Facing of HeavyStrikeTarget) degrees)
Unit - Move HeavyStrikeTarget instantly to HeavyStrikeLoc
Hashtable - Save HeavyStrikeLoop as ((Integer(HeavyStrikeLoop)) - (Integer(0.04))) of 1 in HeavyStrikeHash
Special Effect - Create a special effect attached to the foot of HeavyStrikeTarget using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Unit - Cause HeavyStrikeUnit to damage HeavyStrikeTarget, dealing HeavyStrikeDamage damage of attack type Spells and damage type Normal
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call DestroyGroup(udg_HeavyStrikeGroup)
Custom script: call RemoveLocation(udg_HeavyStrikeLoc)
Hashtable - Clear all child hashtables of child 0 in HeavyStrikeHash[/trigger]
[trigger="Heavy Strike"]Heavy Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Heavy Strike
Actions
Set HeavyStrikeUnit = (Triggering unit)
Set HeavyStrikeTarget = (Target unit of ability being cast)
Set HeavyStrikeDamage = 7.30
Set HeavyStrikeTimer = 2.00
Hashtable - Save HeavyStrikeDamage as 0 of 0 in HeavyStrikeHash
Hashtable - Save HeavyStrikeTimer as 1 of 0 in HeavyStrikeHash
Unit Group - Add HeavyStrikeTarget to HeavyStrikeGroup
Trigger - Turn on Heavy Strike Knockback <gen>[/trigger]
[trigger="Heavy Strike Knockback"]Heavy Strike Knockback
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in HeavyStrikeGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
HeavyStrikeTimer Equal to 0.00
Then - Actions
Set HeavyStrikeTarget = (Target unit of ability being cast)
Set HeavyStrikeDamage = (Load 0 of 0 from HeavyStrikeHash)
Set HeavyStrikeTimer = (Load 1 of 0 from HeavyStrikeHash)
Set HeavyStrikeLoc = ((Position of HeavyStrikeTarget) offset by (Facing of HeavyStrikeTarget) towards (Facing of HeavyStrikeTarget) degrees)
Unit - Move HeavyStrikeTarget instantly to HeavyStrikeLoc
Hashtable - Save HeavyStrikeLoop as ((Integer(HeavyStrikeLoop)) - (Integer(0.04))) of 1 in HeavyStrikeHash
Special Effect - Create a special effect attached to the foot of HeavyStrikeTarget using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Unit - Cause HeavyStrikeUnit to damage HeavyStrikeTarget, dealing HeavyStrikeDamage damage of attack type Spells and damage type Normal
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call DestroyGroup(udg_HeavyStrikeGroup)
Custom script: call RemoveLocation(udg_HeavyStrikeLoc)
Hashtable - Clear all child hashtables of child 0 in HeavyStrikeHash[/trigger]