• 🏆 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!

What's wrong with this?

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
772
I have checked everything in the variables and triggers but still this spell isn't casted when I'm using it but I also have this ability on another map and it works on that one but not on my other map and I didn't create this spell myself. What could be wrong?

  • Initialization Copy
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set VariableSet PowerChainHash = (Last created hashtable)
  • Run Abilities
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Trigger - Run Abilities <gen> (ignoring conditions)
      • -------- - --------
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • Abilities
    • Events
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set VariableSet sorHashFlame = (Last created hashtable)
      • Set VariableSet SpellEventAbility[2] = Dragon's Fire Arrow
      • Set VariableSet SpellEventTrigger[2] = Dragons Fire Arrow Cast <gen>
      • Hashtable - Create a hashtable
      • Set VariableSet sorHashIgnite = (Last created hashtable)
      • -------- - --------
      • Trigger - Run GUI SpellEvent <gen> (ignoring conditions)
      • -------- - --------
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
  • GUI SpellEvent
    • Events
    • Conditions
    • Actions
      • Custom script: local integer i = 0
      • -------- - --------
      • Custom script: call ExecuteFunc("InitSpellEvent")
      • -------- - --------
      • Hashtable - Create a hashtable
      • Set VariableSet SpellEventHash = (Last created hashtable)
      • -------- - --------
      • Custom script: loop
      • Custom script: exitwhen udg_SpellEventAbility[i] == 0
      • Custom script: call SaveTriggerHandle(udg_SpellEventHash, udg_SpellEventAbility[i], 0, udg_SpellEventTrigger[i])
      • Custom script: set i = i + 1
      • Custom script: endloop
      • Custom script: endfunction
      • -------- - --------
      • Custom script: function OnSpell takes nothing returns boolean
      • Custom script: local trigger t = LoadTriggerHandle(udg_SpellEventHash, GetSpellAbilityId(), 0)
      • -------- - --------
      • Custom script: call TriggerExecute(t)
      • -------- - --------
      • Custom script: set t = null
      • Custom script: return false
      • Custom script: endfunction
      • -------- - --------
      • Custom script: function InitSpellEvent takes nothing returns nothing
      • Custom script: local trigger t = CreateTrigger()
      • Custom script: call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
      • Custom script: call TriggerAddCondition(t, Condition(function OnSpell))
      • Custom script: set t = null
  • Dragons Fire Arrow Cast
    • Events
    • Conditions
    • Actions
      • Set VariableSet tempUnit0 = (Casting unit)
      • Set VariableSet tempPlayer = (Owner of tempUnit0)
      • Set VariableSet tempInteger0 = (Hero level of tempUnit0)
      • Set VariableSet tempLoc0 = (Position of tempUnit0)
      • Set VariableSet tempLoc1 = (Target point of ability being cast)
      • Set VariableSet tempReal0 = (Angle from tempLoc0 to tempLoc1)
      • Custom script: call RemoveLocation(udg_tempLoc1)
      • Custom script: set udg_tempLoc1 = null
      • Set VariableSet tempLoc2 = (tempLoc0 offset by sorFlameCollision towards tempReal0 degrees.)
      • Custom script: call RemoveLocation(udg_tempLoc0)
      • Custom script: set udg_tempLoc0 = null
      • Unit - Create 1 Dragon's Fire Arrow for tempPlayer at tempLoc2 facing tempReal0 degrees
      • Custom script: call RemoveLocation(udg_tempLoc2)
      • Custom script: set udg_tempLoc2 = null
      • Unit Group - Add (Last created unit) to sorFlameMGroup
      • Set VariableSet sorCountFlame = (sorCountFlame + 1)
      • Set VariableSet tempInteger1 = (Key (Last created unit).)
      • Hashtable - Save Handle OftempUnit0 as (Key source.) of tempInteger1 in sorHashFlame.
      • Hashtable - Save tempInteger0 as (Key level.) of tempInteger1 in sorHashFlame.
      • Hashtable - Save tempReal0 as (Key angle.) of tempInteger1 in sorHashFlame.
      • Hashtable - Save sorFlameSpeedBase as (Key speed.) of tempInteger1 in sorHashFlame.
      • Hashtable - Save 0.00 as (Key distance.) of tempInteger1 in sorHashFlame.
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dragons Fire Arrow Missile <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Dragons Fire Arrow Missile <gen>
        • Else - Actions
  • Dragons Fire Arrow Missile
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • sorCountFlame Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in sorFlameMGroup and do (Actions)
            • Loop - Actions
              • Set VariableSet tempUnit0 = (Picked unit)
              • Set VariableSet tempPlayer = (Owner of tempUnit0)
              • Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
              • Set VariableSet tempReal0 = (Load (Key distance.) of tempInteger0 from sorHashFlame.)
              • Set VariableSet tempLoc0 = (Position of tempUnit0)
              • Set VariableSet tempGroup = (Units within sorFlameCollision of tempLoc0 matching ((((Matching unit) belongs to an enemy of tempPlayer.) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A struc
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • tempReal0 Greater than or equal to sorFlameRange
                      • (tempGroup is empty) Equal to False
                • Then - Actions
                  • Unit Group - Remove all units from tempGroup.
                  • Custom script: call DestroyGroup(udg_tempGroup)
                  • Custom script: set udg_tempGroup = null
                  • -------- - --------
                  • Unit Group - Remove tempUnit0 from sorFlameMGroup.
                  • Unit - Kill tempUnit0
                  • Set VariableSet sorCountFlame = (sorCountFlame - 1)
                  • -------- - --------
                  • Set VariableSet tempGroup = (Units within sorFlameRadius of tempLoc0 matching ((((Matching unit) belongs to an enemy of tempPlayer.) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structur
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (tempGroup is empty) Equal to True
                    • Then - Actions
                      • Custom script: call DestroyGroup(udg_tempGroup)
                      • Custom script: set udg_tempGroup = null
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • tempReal0 Greater than sorFlameScaleRange
                        • Then - Actions
                          • Set VariableSet tempReal0 = sorFlameScaleRange
                        • Else - Actions
                      • Set VariableSet tempReal1 = (sorFlameDmgMinBase + (((sorFlameDmgMaxBase + (sorFlameDmgMaxInc x (Real(((Load (Key level.) of tempInteger0 from sorHashFlame.) - 1))))) - sorFlameDmgMinBase) x (tempReal0 / sorFlameScaleRange)))
                      • Set VariableSet tempReal2 = (sorIgniteFactor x tempReal1)
                      • Set VariableSet tempReal3 = (intervalAbilityEffects x (tempReal2 / sorIgniteDuration))
                      • Set VariableSet tempUnit0 = (Load (Key source.) of tempInteger0 in sorHashFlame.)
                      • Set VariableSet tempPlayer = (Owner of tempUnit0)
                      • -------- - --------
                      • Hashtable - Clear all child hashtables of child tempInteger0 in sorHashFlame.
                      • -------- - --------
                      • Floating Text - Create floating text that reads ((String((Integer(tempReal1)))) + !) at tempLoc0 with Z offset 64.00, using font size 22.00, color (100.00%, 40.00%, 0.00%), and 0.00% transparency
                      • Floating Text - Change (Last created floating text): Disable permanence
                      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
                      • Floating Text - Change the lifespan of (Last created floating text) to 1.60 seconds
                      • Floating Text - Change the fading age of (Last created floating text) to 1.20 seconds
                      • -------- - --------
                      • Unit Group - Pick every unit in tempGroup and do (Actions)
                        • Loop - Actions
                          • Set VariableSet tempUnit1 = (Picked unit)
                          • Custom script: set udg_tempInteger1 = GetHandleId(udg_tempUnit1)
                          • Unit - Cause tempUnit0 to damage tempUnit1, dealing tempReal1 damage of attack type Spells and damage type Magic
                          • Special Effect - Create a special effect attached to the chest of tempUnit1 using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
                          • Special Effect - Destroy (Last created special effect)
                          • -------- - --------
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (tempUnit1 is in sorIgniteTargets.) Equal to True
                            • Then - Actions
                              • Hashtable - Save (tempReal2 + (Load (Key totaldamage.) of tempInteger1 from sorHashIgnite.)) as (Key totaldamage.) of tempInteger1 in sorHashIgnite.
                            • Else - Actions
                              • Unit Group - Add tempUnit1 to sorIgniteTargets
                              • Hashtable - Save tempReal2 as (Key totaldamage.) of tempInteger1 in sorHashIgnite.
                          • -------- - --------
                          • Unit - Create 1 EffectDummy for tempPlayer at tempLoc0 facing Default building facing degrees
                          • Set VariableSet tempInteger2 = (Key (Last created unit).)
                          • Unit Group - Add (Last created unit) to sorIgniteGroup
                          • Set VariableSet sorCountIgnite = (sorCountIgnite + 1)
                          • Hashtable - Save Handle OftempUnit0 as (Key source.) of tempInteger2 in sorHashIgnite.
                          • Hashtable - Save Handle OftempUnit1 as (Key target.) of tempInteger2 in sorHashIgnite.
                          • Hashtable - Save tempReal2 as (Key damage.) of tempInteger2 in sorHashIgnite.
                          • Hashtable - Save tempReal3 as (Key dpt.) of tempInteger2 in sorHashIgnite.
                          • Hashtable - Save sorIgniteDuration as (Key duration.) of tempInteger2 in sorHashIgnite.
                          • Special Effect - Create a special effect attached to the chest of tempUnit1 using Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
                          • Hashtable - Save Handle Of(Last created special effect) as (Key effect0.) of tempInteger2 in sorHashIgnite.
                          • -------- - --------
                          • Unit Group - Remove tempUnit1 from tempGroup.
                      • Custom script: call DestroyGroup(udg_tempGroup)
                      • Custom script: set udg_tempGroup = null
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Ignite Effects <gen> is on) Equal to False
                        • Then - Actions
                          • Trigger - Turn on Ignite Effects <gen>
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_tempLoc0)
                  • Custom script: set udg_tempLoc0 = null
                • Else - Actions
                  • Set VariableSet tempReal1 = (Load (Key speed.) of tempInteger0 from sorHashFlame.)
                  • Set VariableSet tempReal2 = (Load (Key angle.) of tempInteger0 from sorHashFlame.)
                  • Set VariableSet tempLoc1 = (tempLoc0 offset by tempReal1 towards tempReal2 degrees.)
                  • Custom script: call RemoveLocation(udg_tempLoc0)
                  • Custom script: set udg_tempLoc0 = null
                  • Unit - Move tempUnit0 instantly to tempLoc1
                  • Custom script: call RemoveLocation(udg_tempLoc1)
                  • Custom script: set udg_tempLoc1 = null
                  • Hashtable - Save (tempReal0 + tempReal1) as (Key distance.) of tempInteger0 in sorHashFlame.
                  • Hashtable - Save (tempReal1 + sorFlameSpeedInc) as (Key speed.) of tempInteger0 in sorHashFlame.
  • Ignite Effects
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • sorCountIgnite Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in sorIgniteGroup and do (Actions)
            • Loop - Actions
              • Set VariableSet tempUnit0 = (Picked unit)
              • Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
              • Set VariableSet tempUnit1 = (Load (Key target.) of tempInteger0 in sorHashIgnite.)
              • Set VariableSet tempReal0 = (Load (Key duration.) of tempInteger0 from sorHashIgnite.)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • tempReal0 Less than or equal to 0.00
                      • (tempUnit1 is dead) Equal to True
                      • (tempUnit1 is in sorIgniteTargets.) Equal to False
                • Then - Actions
                  • Unit Group - Remove tempUnit0 from sorIgniteGroup.
                  • Set VariableSet sorCountIgnite = (sorCountIgnite - 1)
                  • Special Effect - Destroy (Load (Key effect0.) of tempInteger0 in sorHashIgnite.)
                  • -------- - --------
                  • Custom script: set udg_tempInteger1 = GetHandleId(udg_tempUnit1)
                  • Set VariableSet tempReal1 = ((Load (Key totaldamage.) of tempInteger1 from sorHashIgnite.) - (Load (Key damage.) of tempInteger0 from sorHashIgnite.))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • tempReal1 Less than or equal to 0.00
                    • Then - Actions
                      • Unit Group - Remove tempUnit1 from sorIgniteTargets.
                      • Hashtable - Clear all child hashtables of child tempInteger1 in sorHashIgnite.
                    • Else - Actions
                      • Hashtable - Save tempReal1 as (Key totaldamage.) of tempInteger1 in sorHashIgnite.
                  • Hashtable - Clear all child hashtables of child tempInteger0 in sorHashIgnite.
                  • Unit - Remove tempUnit0 from the game
                • Else - Actions
                  • Set VariableSet tempUnit0 = (Load (Key source.) of tempInteger0 in sorHashIgnite.)
                  • Unit - Cause tempUnit0 to damage tempUnit1, dealing (Load (Key dpt.) of tempInteger0 from sorHashIgnite.) damage of attack type Spells and damage type Magic
                  • Hashtable - Save (tempReal0 - intervalAbilityEffects) as (Key duration.) of tempInteger0 in sorHashIgnite.
 
  • empty.gif
    join.gif
    set.gif
    Set VariableSet SpellEventAbility[2] = Dragon's Fire Arrow
  • empty.gif
    join.gif
    set.gif
    Set VariableSet SpellEventTrigger[2] = Dragons Fire Arrow Cast <gen>
As I read the "GUI SpellEvent", you must start with 0 and cannot have "gaps" in the number-series on the SpellEventAbility/Trigger
 
Status
Not open for further replies.
Top