1 spell causes others to malfunction

Level 8
Joined
Apr 30, 2009
Messages
338
So on my map I started by making a channel spell based on the ability "Withering Heat" from Warhammer online: it slows and damages as long as the caster channels it. The spell worked fine and here are the triggers:

  • WitheringHeat1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Withering Heat (Bright Wizard - Active)
    • Actions
      • Hashtable - Save Handle Of(Target unit of ability being cast) as (Key target) of (Key (Triggering unit)) in H_WitheringHeat
      • Hashtable - Save ((15.00 + (5.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) + (0.20 x (Load 100 of (Key (Triggering unit)) from H_Spellpower))) as (Key damage/sec) of (Key (Triggering unit)) in H_WitheringHeat
      • Hashtable - Save overhead as 1 of (Key (Triggering unit)) in H_WitheringHeat
      • Hashtable - Save hand, left as 2 of (Key (Triggering unit)) in H_WitheringHeat
      • Hashtable - Save hand, right as 3 of (Key (Triggering unit)) in H_WitheringHeat
      • Hashtable - Save chest as 4 of (Key (Triggering unit)) in H_WitheringHeat
      • Set temp_point[0] = (Position of (Triggering unit))
      • Set temp_point[1] = (temp_point[0] offset by 50.00 towards (Facing of (Triggering unit)) degrees)
      • Custom script: call RemoveLocation( udg_temp_point[0] )
      • Set temp_point[2] = (Position of (Target unit of ability being cast))
      • Lightning - Create a Spirit Link lightning effect from source temp_point[1] to target temp_point[2]
      • Custom script: call RemoveLocation( udg_temp_point[1] )
      • Custom script: call RemoveLocation( udg_temp_point[2] )
      • Hashtable - Save Handle Of(Last created lightning effect) as (Key light) of (Key (Triggering unit)) in H_WitheringHeat
      • Lightning - Change color of (Last created lightning effect) to (1.00 0.50 0.00) with 0.25 alpha
      • Special Effect - Create a special effect attached to the hand, left of (Triggering unit) using Abilities\Spells\Other\BreathOfFire\BreathOfFireDamage.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key left hand) of (Key (Triggering unit)) in H_WitheringHeat
      • Special Effect - Create a special effect attached to the hand, right of (Triggering unit) using Abilities\Spells\Other\BreathOfFire\BreathOfFireDamage.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key right hand) of (Key (Triggering unit)) in H_WitheringHeat
      • Set temp_point[0] = (Position of (Target unit of ability being cast))
      • Unit - Create 1 dummy for (Owner of (Triggering unit)) at temp_point[0] facing Default building facing degrees
      • Custom script: call RemoveLocation( udg_temp_point[0] )
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Human Sorceress - Slow (Target unit of ability being cast)
      • Unit Group - Add (Triggering unit) to WitheringHeatCasters
      • Hashtable - Save 6.00 as (Key duration) of (Key (Triggering unit)) in H_WitheringHeat
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (WitheringHeat2 <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on WitheringHeat2 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (WitheringHeat3 <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on WitheringHeat3 <gen>
        • Else - Actions
  • WitheringHeat2
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in WitheringHeatCasters) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in WitheringHeatCasters and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ((Load (Key target) of (Key (Picked unit)) in H_WitheringHeat) has buff 0~Withering Heat Slow (Bright Wizard)) Equal to False
                      • (Load (Key duration) of (Key (Picked unit)) from H_WitheringHeat) Less than or equal to 0.00
                • Then - Actions
                  • Unit - Remove 0~Withering Heat Slow (Bright Wizard) buff from (Load (Key target) of (Key (Picked unit)) in H_WitheringHeat)
                  • Hashtable - Save 0.00 as (Key duration) of (Key (Picked unit)) in H_WitheringHeat
                  • Special Effect - Destroy (Load (Key left hand) of (Key (Picked unit)) in H_WitheringHeat)
                  • Special Effect - Destroy (Load (Key right hand) of (Key (Picked unit)) in H_WitheringHeat)
                  • Lightning - Destroy (Load (Key light) of (Key (Picked unit)) in H_WitheringHeat)
                  • Unit Group - Remove (Picked unit) from WitheringHeatCasters
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in H_WitheringHeat
                • Else - Actions
                  • Unit - Cause (Picked unit) to damage (Load (Key target) of (Key (Picked unit)) in H_WitheringHeat), dealing (0.10 x (Load (Key damage/sec) of (Key (Picked unit)) from H_WitheringHeat)) damage of attack type Spells and damage type Fire
                  • Set temp_point[0] = (Position of (Picked unit))
                  • Set temp_point[1] = (temp_point[0] offset by 50.00 towards (Facing of (Picked unit)) degrees)
                  • Custom script: call RemoveLocation( udg_temp_point[0] )
                  • Set temp_point[2] = (Position of (Load (Key target) of (Key (Picked unit)) in H_WitheringHeat))
                  • Lightning - Move (Load (Key light) of (Key (Picked unit)) in H_WitheringHeat) to source temp_point[1] and target temp_point[2]
                  • Custom script: call RemoveLocation( udg_temp_point[1] )
                  • Custom script: call RemoveLocation( udg_temp_point[2] )
                  • Special Effect - Create a special effect attached to the (Load (Random integer number between 1 and 4) of (Key (Picked unit)) from H_WitheringHeat) of (Load (Key target) of (Key (Picked unit)) in H_WitheringHeat) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Hashtable - Save ((Load (Key duration) of (Key (Picked unit)) from H_WitheringHeat) - 0.10) as (Key duration) of (Key (Picked unit)) in H_WitheringHeat
                  • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.30)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • ((Load (Key target) of (Key (Picked unit)) in H_WitheringHeat) is dead) Equal to True
                          • (Mana of (Picked unit)) Less than 13.00
                    • Then - Actions
                      • Unit - Order (Picked unit) to Stop
                      • Hashtable - Save 0.00 as (Key duration) of (Key (Picked unit)) in H_WitheringHeat
                    • Else - Actions
        • Else - Actions
          • Trigger - Turn off WitheringHeat3 <gen>
          • Trigger - Turn off (This trigger)
  • WitheringHeat3
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Triggering unit) is in WitheringHeatCasters) Equal to True
    • Actions
      • Hashtable - Save 0.00 as (Key duration) of (Key (Triggering unit)) in H_WitheringHeat

But then I added a spell "Rain of Fire" which is also channeled, but damages a target area. Now, there are often cases where the Withering Heat spell malfunctions and continues the slow infinitely even when the channel stops. Is there something wrong with my Rain of fire spell that causes Withering heat to never end?

  • RainOfFire1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rain of Fire (Bright Wizard - Active)
    • Actions
      • Hashtable - Save Handle Of(Target point of ability being cast) as (Key target) of (Key (Triggering unit)) in H_RainOfFire
      • Hashtable - Save ((20.00 + (10.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) + (0.10 x (Load 100 of (Key (Triggering unit)) from H_Spellpower))) as (Key damage/sec) of (Key (Triggering unit)) in H_RainOfFire
      • Hashtable - Save ((335.00 + (15.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) + 0.00) as (Key radius) of (Key (Triggering unit)) in H_RainOfFire
      • Special Effect - Create a special effect attached to the hand, left of (Triggering unit) using Abilities\Spells\Other\BreathOfFire\BreathOfFireDamage.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key left hand) of (Key (Triggering unit)) in H_RainOfFire
      • Special Effect - Create a special effect attached to the hand, right of (Triggering unit) using Abilities\Spells\Other\BreathOfFire\BreathOfFireDamage.mdl
      • Hashtable - Save Handle Of(Last created special effect) as (Key right hand) of (Key (Triggering unit)) in H_RainOfFire
      • Unit Group - Add (Triggering unit) to RainOfFireCasters
      • Hashtable - Save 10.00 as (Key duration) of (Key (Triggering unit)) in H_RainOfFire
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (RainOfFire2 <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on RainOfFire2 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (RainOfFire3 <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on RainOfFire3 <gen>
        • Else - Actions
  • RainOfFire2
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in RainOfFireCasters) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in RainOfFireCasters and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Load (Key duration) of (Key (Picked unit)) from H_RainOfFire) Less than or equal to 0.00
                • Then - Actions
                  • Special Effect - Destroy (Load (Key left hand) of (Key (Picked unit)) in H_RainOfFire)
                  • Special Effect - Destroy (Load (Key right hand) of (Key (Picked unit)) in H_RainOfFire)
                  • Unit Group - Remove (Picked unit) from RainOfFireCasters
                  • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in H_RainOfFire
                • Else - Actions
                  • Set temp_point[0] = ((Load (Key target) of (Key (Picked unit)) in H_RainOfFire) offset by (Random real number between 0.00 and (Load (Key radius) of (Key (Picked unit)) from H_RainOfFire)) towards (Random real number between 0.00 and 360.00) degrees)
                  • Special Effect - Create a special effect at temp_point[0] using Abilities\Spells\Demon\RainOfFire\RainOfFireTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation( udg_temp_point[0] )
                  • Set temp_point[0] = ((Load (Key target) of (Key (Picked unit)) in H_RainOfFire) offset by (Random real number between 0.00 and (Load (Key radius) of (Key (Picked unit)) from H_RainOfFire)) towards (Random real number between 0.00 and 360.00) degrees)
                  • Special Effect - Create a special effect at temp_point[0] using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation( udg_temp_point[0] )
                  • Set temp_unit[0] = (Picked unit)
                  • Set temp_real[0] = (0.10 x (Load (Key damage/sec) of (Key (Picked unit)) from H_RainOfFire))
                  • Set temp_group = (Units within (Load (Key radius) of (Key (Picked unit)) from H_RainOfFire) of (Load (Key target) of (Key (Picked unit)) in H_RainOfFire) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an ally of (Owner of (Picked unit))
                  • Unit Group - Pick every unit in temp_group and do (Actions)
                    • Loop - Actions
                      • Unit - Cause temp_unit[0] to damage (Picked unit), dealing temp_real[0] damage of attack type Spells and damage type Fire
                      • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
                      • Special Effect - Destroy (Last created special effect)
                      • Unit Group - Remove (Picked unit) from temp_group
                  • Custom script: call DestroyGroup( udg_temp_group )
                  • Hashtable - Save ((Load (Key duration) of (Key (Picked unit)) from H_RainOfFire) - 0.10) as (Key duration) of (Key (Picked unit)) in H_RainOfFire
                  • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.30)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Mana of (Picked unit)) Less than 13.00
                    • Then - Actions
                      • Unit - Order (Picked unit) to Stop
                      • Hashtable - Save 0.00 as (Key duration) of (Key (Picked unit)) in H_RainOfFire
                    • Else - Actions
        • Else - Actions
          • Trigger - Turn off RainOfFire3 <gen>
          • Trigger - Turn off (This trigger)
  • RainOfFire3
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Triggering unit) is in RainOfFireCasters) Equal to True
    • Actions
      • Hashtable - Save 0.00 as (Key duration) of (Key (Triggering unit)) in H_RainOfFire
 
Level 18
Joined
Feb 25, 2009
Messages
2,006
Um, I think you are saving one key more than once, thus it probably overrite the old one (from the heat) and save it for the RoF.

Try using different keys, like "target" for the heat and "target1" for the RoF.
Or create another hashtable for the other ability, and save the keys there.
 
Level 14
Joined
Dec 18, 2007
Messages
1,097
Both spells use the same key:
Save X in Caster's Key, Key Duration.

You get what I mean. You should use different keys.
Hashtables work like a table, so if you save something in row Duration and Column Caster, you can only have one thing stored. (However, Warcraft stores Caster as unique keys so its ok).
You should first try changing duration to something like whduration and rofduration.

Try that and tell me if it worked.

PS: I doubt its the only reason though.
EDIT: Should be the only reason.
 
Level 8
Joined
Apr 30, 2009
Messages
338
they are in different tables, so the keys shouldn't matter:

duration of caster in H_RainofFire

duration of caster in H_WitheringHeat

are the same thing?
 
Level 8
Joined
Apr 30, 2009
Messages
338
So Withering Heat is the only spell that messes up, and because of that I think this section might be why:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • Or - Any (Conditions) are true
  • Conditions
  • ((Load (Key target) of (Key (Picked unit)) in H_WitheringHeat) has buff 0~Withering Heat Slow (Bright Wizard)) Equal to False
  • (Load (Key duration) of (Key (Picked unit)) from H_WitheringHeat) Less than or equal to 0.00
  • Then - Actions
Because I added that at the same time I added the Rain of Fire spell. I wanted to make it so the spell would stop if the target was dispelled. Is there any reason why this is bad?

PS: the 0~ before the buff is so it's at the top of the list :p

Yep I just confirmed it: anytime I check to see if the buff is dispelled, it randomly causes the spell to stop prematurely. So it looks like the game runs this check before it applies the buff, and immediately orders the caster to stop.
 
Level 14
Joined
Dec 18, 2007
Messages
1,097
If that's the case, then you could try basing withering heat off another spell. Stuff like slow generally applies the buff instantly.

For channeling spells, you could always try something like Life Drain or channel and give it a buff, although I doubt it will work.

Anyway, its a bug on the game engine's part. Not much can be done.
 
Top