- Joined
- Jun 16, 2010
- Messages
- 48
I Will Glad If Some One Can Help Me Im New With Hashtables And Im Making A Spell With Them ,I created a spell That slam the ground push all the units back and when they reach to the end a dps start for 4 second .main problem is when i cast my spell for the first time it have a bug & when i slam the ground and there is no unit near me to push back , next time i use my spell no one get dps. ( but if i slam the ground with unit for first time its work fine ) can any one help me?!
Please Test The Spell If U See Any Other Bug Pls Help Me To Fix It.
Fist Part :
Please Test The Spell If U See Any Other Bug Pls Help Me To Fix It.
Fist Part :
-
Actions
-

-------- Setting VB --------
-

Set HS_DDps = 40.00
-

Set HS_TDps = 4.00
-

Set HS_C = (Triggering unit)
-

Set HS_P = (Position of HS_C)
-

Set HS_Loop = (HS_Loop + 1)
-

Set HS_T = 0.90
-

Set HS_D = 50.00
-

Set HS_UG = (Units within 300.00 of HS_P matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of HS_C)) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Playable map area) contains (Matching
-

Trigger - Turn on HS I Loop <gen>
-

Custom script: set bj_wantDestroyGroup = true
-

Unit Group - Pick every unit in HS_UG and do (Actions)
-


Loop - Actions
-



Set HS_Target = (Picked unit)
-



Custom script: set udg_HS_Handle = GetHandleId(udg_HS_Target)
-



Set HS_P2 = (Position of HS_Target)
-



Set HS_A = (Angle from HS_P2 to HS_P)
-



Set HS_Dis = (300.00 - (Distance between HS_P2 and HS_P))
-



Unit Group - Add HS_Target to HS_Group
-



Unit - Turn collision for HS_Target Off
-



Hashtable - Save HS_T as 1 of HS_Handle in HS_H
-



Hashtable - Save HS_A as 2 of HS_Handle in HS_H
-



Hashtable - Save HS_D as 3 of HS_Handle in HS_H
-



Hashtable - Save (HS_Dis / 6.00) as 4 of HS_Handle in HS_H
-



Hashtable - Save HS_TDps as 5 of HS_Handle in HS_H
-



Hashtable - Save HS_DDps as 6 of HS_Handle in HS_H
-



Custom script: call RemoveLocation(udg_HS_P2)
-
-
-

Custom script: call RemoveLocation(udg_HS_P)
-
-
HS I Loop
-

Events
-


Time - Every 0.03 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in HS_Group and do (Actions)
-



Loop - Actions
-




Hashtable - Save (HS_T - 0.03) as 1 of HS_Handle in HS_H
-




Set HS_Target = (Picked unit)
-




Custom script: set udg_HS_Handle = GetHandleId(udg_HS_Target)
-




Set HS_T = (Load 1 of HS_Handle from HS_H)
-




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





If - Conditions
-






HS_T Less than or equal to 0.00
-
-





Then - Actions
-






Trigger - Turn on HS I Dps <gen>
-
-





Else - Actions
-
-




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





If - Conditions
-






HS_T Greater than 0.00
-
-





Then - Actions
-






Destructible - Pick every destructible within 100.00 of (Position of HS_Target) and do (Actions)
-







Loop - Actions
-








Destructible - Kill (Picked destructible)
-
-
-






Set HS_A = (Load 2 of HS_Handle from HS_H)
-






Set HS_D = (Load 3 of HS_Handle from HS_H)
-






Set HS_Dis = (Load 4 of HS_Handle from HS_H)
-






Set HS_P = (Position of HS_Target)
-






Set HS_P2 = (HS_P offset by HS_D towards (HS_A + 180.00) degrees)
-






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







If - Conditions
-








((Playable map area) contains HS_P2) Equal to True
-
-







Then - Actions
-








Unit - Move HS_Target instantly to HS_P2, facing HS_A degrees
-
-







Else - Actions
-
-






Special Effect - Create a special effect attached to the origin of HS_Target using Abilities\Spells\Other\HealingSpray\HealBottleMissile.mdl
-






Special Effect - Destroy (Last created special effect)
-






Hashtable - Save (HS_Dis x (HS_T x HS_T)) as 3 of HS_Handle in HS_H
-






Custom script: call RemoveLocation(udg_HS_P)
-






Custom script: call RemoveLocation(udg_HS_P2)
-
-





Else - Actions
-






Hashtable - Clear all child hashtables of child HS_Handle in HS_H
-






Unit Group - Remove HS_Target from HS_Group
-






Unit - Turn collision for HS_Target On
-






Set HS_Loop = (HS_Loop - 1)
-






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







If - Conditions
-








HS_Loop Less than or equal to 0
-
-







Then - Actions
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-
-
-
-
-
-
-
-
HS I Dps
-

Events
-


Time - Every 1.00 seconds of game time
-
-

Conditions
-

Actions
-


Unit Group - Pick every unit in HS_Group and do (Actions)
-



Loop - Actions
-




Set HS_Target = (Picked unit)
-




Custom script: set udg_HS_Handle = GetHandleId(udg_HS_Target)
-




Set HS_DDps = (Load 6 of HS_Handle from HS_H)
-




Set HS_TDps = (Load 5 of HS_Handle from HS_H)
-




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





If - Conditions
-






HS_TDps Greater than 0.00
-
-





Then - Actions
-






Hashtable - Save (HS_TDps - 1.00) as 5 of HS_Handle in HS_H
-






Unit - Cause HS_C to damage HS_Target, dealing HS_DDps damage of attack type Spells and damage type Normal
-






Special Effect - Create a special effect attached to the overhead of HS_Target using Abilities\Spells\Items\PotionOfOmniscience\CrystalBallCaster.mdl
-






Special Effect - Destroy (Last created special effect)
-
-





Else - Actions
-






Hashtable - Clear all child hashtables of child HS_Handle in HS_H
-






Unit Group - Remove HS_Target from HS_Group
-
-
-
-
-
-
Attachments
Last edited:
