• 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.

Hashtable problems

Status
Not open for further replies.
Level 3
Joined
Nov 12, 2007
Messages
28
Hello Hive how you doin?
I'm getting cardiac arrest again, made an item spell that heals when hero's below 20% hp worked nicely, copied item and triggers to another map and voila it's not working how is that even possible?
  • Dreadnaught
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacked unit) Equal to Mograine
      • (Mograine has an item of type |cff8b00ffDreadnaught Battlegear|r|n) Equal to True
      • (Percentage life of Mograine) Less than or equal to 20.00
    • Actions
      • Hashtable - Save 5.00 as 1 of (Key (Attacked unit)) in hashTable
      • Unit Group - Add Mograine to DreadnaughtHeal
      • Set HitPoints = (0.06 x (Max life of Mograine))
      • Trigger - Turn on Dreadnaught2 <gen>
  • Dreadnaught2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in DreadnaughtHeal and do (Actions)
        • Loop - Actions
          • Set RemainingTime = (Load 1 of (Key (Picked unit)) from hashTable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RemainingTime Greater than 0.00
              • (Mograine is alive) Equal to True
            • Then - Actions
              • Unit - Set life of Mograine to ((Life of Mograine) + HitPoints)
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using war3campImported\HowlTarget.mdx
              • Hashtable - Save (RemainingTime - 1.00) as 1 of (Key (Picked unit)) in hashTable
            • Else - Actions
              • Unit Group - Remove (Picked unit) from DreadnaughtHeal
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in hashTable
              • Trigger - Turn off (This trigger)
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
before we go to the deepest of your trigger, i want to make sure that you were already created the hashtable on map initialization

  • Hashtable - Create a hashtable
  • Set hashTable = (Last Created Hashtable)
this thing is become the main cause of a problem with hashtable when you're copying the trigger from one map into another.
 
Status
Not open for further replies.
Top