• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Flamespell.

Status
Not open for further replies.
Level 3
Joined
Nov 22, 2014
Messages
50
Hi, I am trying to use hashtables for the first time, that might be a part of the problem.
The objective is, that units can have stacks of 'hyperthermia', that damages them over time but those stacks diminish with 10% (with a minimum of 1) per second.
On the other hand, being near a fiery object or unit, increases the amount of stacks on target unit.

The first instance of damage always works fine. It deals the damage as expected.
But then it goes straight to the damage and stop part(trigger 2), regardless of how much damage/stacks they got.

So... i guess I am doing something wrong...

In addition, are there some other obnoxious mistakes or unnecessities in these triggers?

  • Emanating Heat Stacks
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in FieryGroup and do (Actions)
        • Loop - Actions
          • Set Temp_Point = (Position of (Picked unit))
          • Set Temp_Unitgroup = (Units within 160.00 of Temp_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Owner of (Matching unit)) is an enemy of (Owner of Volcanus 0062 <gen>)) Equal to True) and (((Match
          • Unit Group - Pick every unit in Temp_Unitgroup and do (Actions)
            • Loop - Actions
              • Set Temp_real = (Load 0 of (Key (Picked unit)) from Hashtable)
              • Set Temp_Point2 = (Position of (Picked unit))
              • Hashtable - Save (((Real((Intelligence of Volcanus 0062 <gen> (Include bonuses)))) x (0.06 + (0.02 x (Real((Level of Emanating Heat for Volcanus 0062 <gen>)))))) + Temp_real) as 0 of (Key (Picked unit)) in Hashtable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_real Equal to 0.00
                • Then - Actions
                  • Floating Text - Create floating text that reads (String((Integer(Temp_real)))) above (Picked unit) with Z offset 0.00, using font size 9.00, color (100.00%, 40.00%, 0.00%), and 0.00% transparency
                  • Hashtable - Save Handle Of(Last created floating text) as 1 of (Key (Picked unit)) in Hashtable
                  • Unit Group - Add (Picked unit) to HyperthermiaGroup
                  • Game - Display to (All players) the text: New Hyperthermia Un...
                • Else - Actions
                  • Floating Text - Change text of (Load 1 of (Key (Picked unit)) in HashtableIf the label is not found, this function returns NULL.) to (String((Integer((Load 0 of (Key (Picked unit)) from Hashtable))))) using font size 9.00
                  • Game - Display to (All players) the text: More Hyperthermia o...
              • Special Effect - Create a special effect at Temp_Point2 using Environment\LargeBuildingFire\LargeBuildingFire2.mdl
              • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation( udg_Temp_Point2 )
          • Custom script: call DestroyGroup( udg_Temp_Unitgroup )
          • Custom script: call RemoveLocation( udg_Temp_Point )
  • HyperthermiaDamageticks
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (HyperthermiaGroup is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in HyperthermiaGroup and do (Actions)
        • Loop - Actions
          • Set Temp_real = (Load 0 of (Key (Picked unit)) from Hashtable)
          • Set SpellDamage = True
          • Unit - Cause Volcanus 0062 <gen> to damage (Picked unit), dealing Temp_real damage of attack type Spells and damage type Normal
          • Set SpellDamage = False
          • Set Temp_real = (Min((Temp_real x 0.90), (Temp_real - 1.00)))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_real Greater than or equal to 1.00
            • Then - Actions
              • Hashtable - Save Temp_real as 0 of (Key (Picked unit)) in Hashtable
              • Floating Text - Change text of (Load 1 of (Key (Picked unit)) in HashtableIf the label is not found, this function returns NULL.) to (String((Integer((Load 0 of (Key (Picked unit)) from Hashtable))))) using font size 9.00
              • Game - Display to (All players) the text: Damage and continue.
            • Else - Actions
              • Floating Text - Destroy (Load 1 of (Key (Picked unit)) in HashtableIf the label is not found, this function returns NULL.)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hashtable
              • Unit Group - Remove (Picked unit) from HyperthermiaGroup
              • Game - Display to (All players) the text: Damage and stop.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Hi Eriador.

I suggest you to take a look at my Effect Over Time System as it will be way easier to make this spell in that one instead.
I will help you make it if you do not find your way through it.

(However you should wait with using it until I uploaded 2.1 :D I am updating this system all over the time:
2.0 yesterday
2.0.1 yesterday
2.1 today/tonight :D)
 
Level 3
Joined
Nov 22, 2014
Messages
50
No, I want to know the problem with this trigger, I need those stacks.

Those stacks can be used by other spells as instant damage, other spells can stop the diminishing of the stacks etcetera.
 
Level 3
Joined
Nov 22, 2014
Messages
50
Found the problem... when the damage occurred, another trigger triggered, changing temp_real, screwing up the amount of damage.
 
Status
Not open for further replies.
Top