• 🏆 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 wrong with my Spell?

Status
Not open for further replies.
Level 6
Joined
Aug 26, 2009
Messages
221
I try to make a triggered spell. But i don't know it just triggered once every game. I've read the tutorial and this tutorial too. But it still error. Someone help me!

  • AncientClaw MainTrigg
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ancient Claw
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AC_IndexNumb Equal to 0
        • Then - Actions
          • Set AC_IndexNumb = (AC_IndexNumb + 1)
          • Set AC_UnitIndex = (AC_UnitIndex + 1)
          • Set AC_LoopIsOn[AC_UnitIndex] = True
          • Set AC_Caster[AC_UnitIndex] = (Triggering unit)
          • Set AC_Target[AC_UnitIndex] = (Target unit of ability being cast)
          • Set AC_LocTemp = (Position of (Target unit of ability being cast))
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at AC_LocTemp facing 0.00 degrees
          • Set AC_Dummy[AC_UnitIndex] = (Last created unit)
          • Special Effect - Create a special effect at AC_LocTemp using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
          • Custom script: call RemoveLocation(udg_AC_LocTemp)
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
  • AncientClaw LoopTrigg
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer AC_LoopIndex) from 1 to AC_UnitIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • AC_LoopIsOn[AC_LoopIndex] Equal to True
            • Then - Actions
              • Set AC_WaitCounter[AC_LoopIndex] = (AC_WaitCounter[AC_LoopIndex] + 0.03)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AC_WaitCounter[AC_LoopIndex] Less than 1.00
                • Then - Actions
                  • Unit - Add a 2.00 second Generic expiration timer to AC_Dummy[AC_UnitIndex]
                  • Unit - Add Slow (Ancient Claw) to AC_Dummy[AC_UnitIndex]
                  • Unit - Set level of Slow (Ancient Claw) for AC_Dummy[AC_UnitIndex] to (Level of Ancient Claw for AC_Caster[AC_UnitIndex])
                  • Unit - Order AC_Dummy[AC_UnitIndex] to Human Sorceress - Slow AC_Target[AC_UnitIndex]
                • Else - Actions
                  • Unit - Add a 0.03 second Generic expiration timer to AC_Dummy[AC_UnitIndex]
                  • Set AC_Caster[AC_UnitIndex] = No unit
                  • Set AC_Dummy[AC_UnitIndex] = No unit
                  • Set AC_Target[AC_UnitIndex] = No unit
                  • Set AC_WaitCounter[AC_LoopIndex] = 0.00
                  • Set AC_LoopIsOn[AC_LoopIndex] = False
                  • Set AC_LoopIndex = (AC_IndexNumb - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • AC_IndexNumb Equal to 0
                    • Then - Actions
                      • Set AC_UnitIndex = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
I attach the map too :
 

Attachments

  • SpellAncientClaw.w3x
    22 KB · Views: 55
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
It should be like this or else the other trigger won't turn on again.

  • AncientClaw MainTrigg
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ancient Claw
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AC_IndexNumb Equal to 0
        • Then - Actions
          • Trigger - Turn on AncientClaw LoopTrigg <gen>
        • Else - Actions
      • Set AC_IndexNumb = (AC_IndexNumb + 1)
      • Set AC_UnitIndex = (AC_UnitIndex + 1)
      • Set AC_LoopIsOn[AC_UnitIndex] = True
      • Set AC_Caster[AC_UnitIndex] = (Triggering unit)
      • Set AC_Target[AC_UnitIndex] = (Target unit of ability being cast)
      • Set AC_LocTemp = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at AC_LocTemp facing 0.00 degrees
      • Set AC_Dummy[AC_UnitIndex] = (Last created unit)
      • Special Effect - Create a special effect at AC_LocTemp using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
      • Custom script: call RemoveLocation(udg_AC_LocTemp)
      • Special Effect - Destroy (Last created special effect)
 
Status
Not open for further replies.
Top