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

My spell doesn't work as it should.

Status
Not open for further replies.
Level 5
Joined
Jul 14, 2008
Messages
121
I'm trying to make a passive spell, it should use an dead unit corpse to heal the hero of # hp. Also should auto-cast shadow strike on a nearby enemy unit if there's one. The part where it heal the unit works, the auto-cast shadow strike doesn't work, the unit is created, then he cast shadow strike, but then it doesn't get removed...

My trigger:

  • Salvation
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Salvation
    • Actions
      • Set Salvation_dCasterUnit = (Learning Hero)
      • Trigger - Turn on Salvation Effect <gen>
      • Trigger - Turn off (This trigger)
  • Salvation Effect
    • Events
      • Time - Every 8.00 seconds of game time
    • Conditions
    • Actions
      • Set Salvation_dLoc1 = (Position of Salvation_dCasterUnit)
      • Set Salvation_dTargetUnit = (Random unit from (Units within 512.00 of Salvation_dLoc1 matching (((Matching unit) is dead) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Salvation_dTargetUnit Not equal to No unit
          • (Salvation_dCasterUnit is alive) Equal to True
        • Then - Actions
          • Set Salvation_dLoc2 = (Position of Salvation_dTargetUnit)
          • Set Demon_jump_target = (Random unit from (Units within 800.00 of Salvation_dLoc2 matching ((((Matching unit) belongs to an enemy of (Owner of Salvation_dCasterUnit)) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False
          • Unit - Create 1 Salvation Aura Effect [Step 2] for (Owner of Salvation_dCasterUnit) at Salvation_dLoc2 facing (Random angle) degrees
          • Unit - Set level of Salvation Aura Heal for (Last created unit) to (Level of Salvation for Salvation_dCasterUnit)
          • Unit - Order (Last created unit) to Human Paladin - Holy Light Salvation_dCasterUnit
          • Unit - Make (Last created unit) Explode on death
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Remove Salvation_dTargetUnit from the game
          • Unit - Create 1 Shadow Demon Dummy for (Owner of Salvation_dCasterUnit) at Salvation_dLoc2 facing Default building facing degrees
          • Unit - Set level of Shadow Demon for (Last created unit) to (Level of Salvation for Salvation_dCasterUnit)
          • Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike Demon_jump_target
          • Unit - Add a 2.50 second Generic expiration timer to (Last created unit)
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Salvation_dLoc1)
      • Custom script: call RemoveLocation(udg_Salvation_dLoc2)
Sorry for my bad english...
Also, can someone tell me how to use hidden in forums?
 
Last edited:
Level 21
Joined
Jul 2, 2009
Messages
2,934
Be sure everything is in their proper place and the spells that you want are working.
Happened to me once of a aura I wanted to give my Blood Elves, but made them all invisible.
 
Level 21
Joined
Jul 2, 2009
Messages
2,934
What do you mean by "everything is in their proper place" ?

Make sure everything is in the places you want them to be. Probably the spell is in the right place, but the actual casting spell for the unit isn't right.
 
Level 21
Joined
Jul 2, 2009
Messages
2,934
Oh and its been a long time since I did any custom spells. I sorry I can't help you with your problem man. I'll be sure to tell someone to help you.
 
Level 5
Joined
Jul 14, 2008
Messages
121
Nvm.. I repaired it, for some reasons expiration timer wasn't working on the second dummy, so I added a third trigger to remove the dummy after few sec.
 
Status
Not open for further replies.
Top