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

[Trigger] Spell trigger dummy buff

Status
Not open for further replies.
Level 2
Joined
Dec 9, 2008
Messages
9
I'm trying to make a spell for a unit that dispels all negative buffs from an ally and keeps him from getting any negative buffs for some time.

The problem is that I'm trying to create a buff on the allied unit (the spell only displays negative buffs and this one is positive) but the buff does not show.

  • Then - Actions
    • Trigger - Turn on Dispel over time dispel ally <gen>
    • Countdown Timer - Start DispelOverTime as a One-shot timer that will expire in 15.00 seconds
    • Set DispelAllyloc = (Position of (Target unit of ability being cast))
    • Unit - Create 1 Dummy (Locust) (All) for (Owner of Bjarki) at DispelAllyloc facing Default building facing degrees
    • Set DispelbuffUnit = (Last created unit)
    • Unit - Add a 6.00 second Generic expiration timer to DispelbuffUnit
    • Unit - Add Dispel over time (dummy)(bjarki) to DispelbuffUnit
    • Unit - Set level of Dispel over time (dummy)(bjarki) for DispelbuffUnit to (Level of Dispel (Bjarki) for Bjarki)
    • Unit - Order DispelbuffUnit to Night Elf Druid Of The Claw - Rejuvenation DispelOverTimeTarget
    • Custom script: call RemoveLocation(udg_DispelAllyloc)
I make the dummy unit cast a modified rejuvenation on the target.

This is the rest of the trigger:
  • Dispel over time dispel ally
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit - Remove Negative buffs from DispelOverTimeTarget
  • Dispel over time dispel stop
    • Events
      • Time - DispelOverTime expires
    • Conditions
    • Actions
      • Trigger - Turn off Dispel over time dispel enemy <gen>
      • Trigger - Turn off Dispel over time dispel ally <gen>

If anyone finds the reason that the buff does not show, please let me know.
 
Level 2
Joined
Dec 9, 2008
Messages
9
I tried adding the rejuvenation spell to a spell casting unit and tried to cast it, but couldn't target any units. Has the default targets allowed checked in (Air, Ground, Friend, Vulnerable, Invulnerable, Self, Organic, Neutral).
 
Level 9
Joined
Jun 7, 2008
Messages
440
You need to get the unit ordercode of the spell. I dont know the exact order for the rejuvination spell. Instead of using nightelf - rejuv. use
  • Actions
    • unit - order dispelBuffUnit to (order(rejuvenation) dispelovertime target
As well, did you set the "target unit of ability being cast" variable?
EDIT: Would it not be easier to add an Anti Magic Shell ability with a modified model to the target unit. Or did you want to allow positive buffs to the unit?
 
Status
Not open for further replies.
Top