• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

[Trigger] Spell Error, Need Help

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Hi, ive started making spells and im creating my spell "Call of the Angel" it works perfect, but i dont know how to heal him over time, paralyze the units 4 seconds.

my code so far
  • Call of the Angel
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Call of the Angel
    • Actions
      • -------- - --------
      • -------- Variables --------
      • Set TempCaster = (Triggering unit)
      • Set TempLoc = (Position of TempCaster)
      • Set TempGroup = (Units within 300.00 of TempLoc)
      • -------- - --------
      • -------- Fx --------
      • Special Effect - Create a special effect attached to the origin of TempCaster using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Set TempFX = (Last created special effect)
      • Special Effect - Destroy TempFX
      • -------- - --------
      • -------- Healing Spell --------
      • Unit - Create 1 Dummy for (Owner of TempCaster) at TempLoc facing Default building facing degrees
      • Set Dummy = (Last created unit)
      • Unit - Add a 2.00 second Generic expiration timer to Dummy
      • -------- - --------
      • -------- Paralyze --------
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • -------- - --------
          • -------- FX --------
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Polymorph\PolyMorphTarget.mdl
          • Set TempFX = (Last created special effect)
          • Special Effect - Destroy TempFX
          • -------- - --------
      • -------- - --------
      • -------- REMOVING LEAKS --------
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • -------- - --------
Now, the problem is that they "Anti-Heal" him
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Well, concerning paralyzing, you can pause them and after 4 seconds unpause them.

About heal over time... You can create a rejuvenation-based ability, modify some data if you need to and create couple of dummy units (depending on how much units you wanna heal) and make them cast that ability on those units.
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
Riptokus helped me on the chat. Problem solved.

  • Call of the Angel
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Call of the Angel
    • Actions
      • -------- - --------
      • -------- Variables --------
      • Set TempCaster = (Triggering unit)
      • Set TempLoc = (Position of TempCaster)
      • Set TempGroup = (Units within 600.00 of TempLoc)
      • -------- - --------
      • -------- Fx --------
      • Special Effect - Create a special effect attached to the origin of TempCaster using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
      • Set TempFX = (Last created special effect)
      • Special Effect - Destroy TempFX
      • -------- - --------
      • -------- Healing Spell --------
      • Unit - Create 1 Dummy for (Owner of TempCaster) at TempLoc facing Default building facing degrees
      • Set Dummy = (Last created unit)
      • Unit - Order Dummy to Human Priest - Heal TempCaster
      • Unit - Add a 3.00 second Generic expiration timer to Dummy
      • -------- - --------
      • -------- Paralyze --------
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of TempCaster)) Equal to True
              • ((Picked unit) is Magic Immune) Not equal to True
              • ((Picked unit) has buff Invulnerable) Not equal to True
            • Then - Actions
              • -------- FX --------
              • -------- - --------
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\StormBolt\StormBoltMissile.mdl
              • Set TempFX = (Last created special effect)
              • Special Effect - Destroy TempFX
              • -------- - --------
              • -------- Paralyze --------
              • Unit - Create 1 Dummy for (Owner of TempCaster) at TempLoc facing Default building facing degrees
              • Set Dummy = (Last created unit)
              • Unit - Order Dummy to Human Mountain King - Storm Bolt (Picked unit)
              • Unit - Add a 3.00 second Generic expiration timer to Dummy
              • -------- - --------
            • Else - Actions
      • -------- - --------
      • -------- REMOVING LEAKS --------
      • Custom script: call DestroyGroup(udg_TempGroup)
      • Custom script: call RemoveLocation(udg_TempLoc)
      • -------- - --------
:)
 
Status
Not open for further replies.
Top