• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Hashtable Problem

Status
Not open for further replies.
Level 5
Joined
Apr 23, 2009
Messages
65
Hello, while i was making this spell for Aesthetics i came upon a problem i couldnt fix. This happened to me before with my meat hook spell but i somehow got around it. Unfortunetly i forgot how i did so. Anyway here is the trigger.
  • AS Move
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in AS_Casters and do (Actions)
        • Loop - Actions
          • Set SA_Angle = (Load (Key angle) of (Key (Picked unit)) from SA_Hashtable)
          • Set SA_Range = (Load (Key range) of (Key (Picked unit)) from SA_Hashtable)
          • Set SA_Speed = (Load (Key speed) of (Key (Picked unit)) from SA_Hashtable)
          • Set SA_TDamage = (Load (Key damage) of (Key (Picked unit)) from SA_Hashtable)
          • Set SA_Time = (Load (Key time) of (Key (Picked unit)) from SA_Hashtable)
          • Set SA_Arrow = (Load (Key arrow) of (Key (Picked unit)) in SA_Hashtable)
          • Set SA_MoveLoc = ((Position of SA_Arrow) offset by SA_Speed towards SA_Angle degrees)
          • Set SA_HitUnits = (Random 1 units from (Units within 50.00 of SA_MoveLoc))
          • Unit - Move SA_Arrow instantly to SA_MoveLoc, facing SA_Angle degrees
          • Unit Group - Pick every unit in SA_HitUnits and do (Actions)
            • Loop - Actions
              • Unit - Cause SA_Arrow to damage (Picked unit), dealing SA_TDamage damage of attack type Pierce and damage type Normal
              • Unit - Remove SA_Arrow from the game
The problem is. How do i clear the child hashtables of the caster after the arrow is removed?
 
Level 5
Joined
Apr 23, 2009
Messages
65
call FlushChildHashtable(udg_SA_Hashtable, GetHandleId(GetEnumUnit()))


I've never flushed a hashtable before so, not sure if the above works. I'm also assuming key in GUI means the handle id.
So will this clear the hastable for the caster only? Sorry but i have no JASS knowledge. Yes normally it would be handle id but in mine it is string id.
 
Status
Not open for further replies.
Top