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

Dying unit does not have buff?

Status
Not open for further replies.
Level 6
Joined
Feb 21, 2008
Messages
205
  • Frenzy Aura
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) has buff Frenzy Aura ) Equal to True
    • Actions
      • Set Frenzy_group = (Units within 100.00 of (Position of (Dying unit)))
      • Unit Group - Pick every unit in Frenzy_group and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Caster unit (Frenzy) for (Owner of (Dying unit)) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Set level of Frenzy (dummy) for (Last created unit) to (Level of Frenzy Aura for Troll Warlord 0180 <gen>)
          • Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
So when a unit dies, every unit around him go into a frenzied state, having their damage increased by 15/25/35%, but nothing happens. I think I recall some1 saying something about dying units does not have a buff, so how do you suggest I can fix this spell?
 
Level 6
Joined
Feb 21, 2008
Messages
205
That worked cheers, but I have to set the custom value down when they go out of range too, how?

  • Leaves range of frenzy aura
    • Events
      • Unit - A unit comes within -600.00 of Troll Warlord 0180 <gen>
    • Conditions
      • (Level of Frenzy Aura for Troll Warlord 0180 <gen>) Greater than or equal to 1
    • Actions
      • Unit - Set the custom value of (Triggering unit) to -1
Setting the value to minus 600 did not work.
 
Level 4
Joined
May 17, 2008
Messages
75
If the Troll Warlord is a pre-placed unit anyway you can just check if a dying unit is within range of the Troll Warlord (and whether it's an ally, whether the Warlord is alive and whether the Warlord has the aura.)
 
Level 6
Joined
Feb 21, 2008
Messages
205
If the Troll Warlord is a pre-placed unit anyway you can just check if a dying unit is within range of the Troll Warlord (and whether it's an ally, whether the Warlord is alive and whether the Warlord has the aura.)

Yeah that would probably be easier, cheers.

Edit, slight problem here fellas:

  • Frenzy Aura
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Distance between (Position of (Dying unit)) and (Position of Troll Warlord 0180 <gen>)) Less than or equal to 800.00
      • (Level of Frenzy Aura for Troll Warlord 0180 <gen>) Greater than or equal to 1
    • Actions
      • Set Frenzy_group = (Units within 175.00 of (Position of (Dying unit)))
      • Special Effect - Create a special effect attached to the overhead of (Dying unit) using Abilities\Spells\NightElf\BattleRoar\RoarCaster.mdl
      • Unit Group - Pick every unit in Frenzy_group and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Caster unit (Frenzy) for (Owner of (Dying unit)) at (Position of (Picked unit)) facing Default building facing degrees
          • Unit - Set level of Frenzy (dummy) for (Last created unit) to (Level of Frenzy Aura for Troll Warlord 0180 <gen>)
          • Unit - Add a 6.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Human Priest - Inner Fire (Picked unit)
Well, the dummy unit also "dies", so they create a dummy unit at that dying dummy unit, and a dummy unit on that dummy unit again, and in the end the map crashes. So is there a way to cast on this ability on every in the unit group except the unit-type "frenzy dummy unit"?
 
Last edited:
Level 4
Joined
May 17, 2008
Messages
75
No, just add a condition to the trigger: "unit-type of triggering unit not equal to dummy unit".

And using points like that in the condition leaks two points. Unfortunately it's hard to fix leaks in conditions in GUI, and for some reason the IsUnitInRange function seems not to be listed in GUI at all.

There are other point leaks and a unit group leak in the trigger anyway.
 
Level 11
Joined
Apr 6, 2008
Messages
760
  • (call GetUnitAbilityLevel(GetDyingUnit(),'Aloc') == 0)
this is how custom script looks in condition(JNGP), this will check if the unit has the locust ability(unselectalbe, no pathing, invurnable and wont get picked by groups) if it dont have it, this will return true

better to do this if u have other spells that use dummys/projectiles
 
Status
Not open for further replies.
Top