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

[Spell] Shield-Spell Not working

Status
Not open for further replies.
I tried to do a Shield Spell using hashtables and the Bribe's GDD, but i have a strange problem, 0 is always stored in hashtable and some actions aren't done.

  • Bouclier de Glace cast
    • Evénements
      • Unité - A unit Initie l'effet d'une compétence
    • Conditions
      • (Ability being cast) Egal Ã* Bouclier de Glace
    • Actions
      • Table de hachage - Save (100.00 x (Real((Level of Bouclier de Glace for (Triggering unit))))) as 0 of (Key (Target unit of ability being cast)) in BdG_Hash
      • Table de hachage - Save (Level of Bouclier de Glace for (Triggering unit)) as 1 of (Key (Target unit of ability being cast)) in BdG_Hash
      • --------Both show 0--------
      • Partie - Display to (All players) the text: (String((Load 0 of (Key (Target unit of ability being cast)) from BdG_Hash)))
      • Partie - Display to (All players) the text: (String((Load 1 of (Key (Target unit of ability being cast)) from BdG_Hash)))
  • Bouclier de Glace loop
    • Evénements
      • Partie - GDD_Event becomes Egal Ã* 0.00
    • Conditions
      • (GDD_DamagedUnit has buff Bouclier de Glace ) Egal Ã* TRUE
    • Actions
      • Custom script: set udg_BdG_Handle = GetHandleId(udg_GDD_DamagedUnit)
      • Set BdG_Real = (Load 0 of BdG_Handle from BdG_Hash)
      • Partie - Display to (All players) the text: (String((Load 0 of BdG_Handle from BdG_Hash)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • BdG_Real Supérieur Ã* GDD_Damage
        • Alors - Actions
          • Table de hachage - Save (BdG_Real - GDD_Damage) as 0 of BdG_Handle in BdG_Hash
          • Partie - Display to (All players) the text: (String((Load 0 of BdG_Handle from BdG_Hash)))
          • Unité - Set life of GDD_DamagedUnit to ((Vie of GDD_DamagedUnit) + GDD_Damage)
        • Sinon - Actions
          • Unité - Remove Bouclier de Glace buff from GDD_DamagedUnit
          • Unité - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing (GDD_Damage - BdG_Real) damage of attack type Chaos and damage type Divin
          • --------After this, all don't work (except the clear child hashtables mbe)--------
          • Set BdG_Point = (Position of GDD_DamagedUnit)
          • Unité - Create 1 BdG Dummy for (Owner of GDD_DamagedUnit) at BdG_Point facing Orientation bâtiment par défaut degrees
          • Unité - Set level of BdG SlowDoms for (Last created unit) to (Load 1 of BdG_Handle from BdG_Hash)
          • Unité - Order (Last created unit) to Roi de la montagne humain - Coup de tonnerre
          • Unité - Add a 1.00 second Générique expiration timer to (Last created unit)
          • Table de hachage - Clear all child hashtables of child BdG_Handle in BdG_Hash
          • Custom script: call RemoveLocation(udg_BdG_Point)
 
Status
Not open for further replies.
Top