• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

'Buff' trigger problem

Status
Not open for further replies.
Hi everyone, I used critical strike as base ability for 'time lock' like in DOTA. I gave the critical strike, a duration and a custom buff (Time lock). Then I went to the triggers:
  • TimeLock
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in LockedUnits and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Time lock ) Equal to False
            • Then - Actions
              • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
              • Unit Group - Remove (Picked unit) from LockedUnits
            • Else - Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Time lock ) Equal to True)) and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Unit Group - Add (Picked unit) to LockedUnits
      • Custom script: call DestroyGroup(GetLastCreatedGroup())
At the end of the day, this ability works 100%.
So I made a new custom ability for a ward based on phoenix fire. Where phoenix fire deals damage over time, the new phoenix fire should lock units in time. I gave it also the time lock buff and the target get the buff but it doesn't pause. Please help
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
EDIT: Sorry, i missread.

Are you sure the units gets the Time Lock buff? I think it's getting the Phoenix Fire buff instead.

Why don't you make a triggered bash? Detect the attack, order a dummy to cast stun and pause the unit. It's a lot better than a 0.05 loop
 
u have a loop trigger with no casting trigger ? u shouldnt do it that way. also were does LockedUnits group come from then ?
u also shouldnt pick every unit in the entire map every .05 seconds. this spell will lag very bad when other spells are ran
My bad, it was one of my first own spells ever creatad so I didn't thought about casting triggers at that time. The locked units is a unit group varible. It picks every unit in playable map and add it the the group to do actions with. Speaking about pick every unit in map, how else should I identifi the timelock on the units? Almost all my custom spells use 'pick every unit in map' but I don't know any other way :(

*Whisper*: That's why I spoke about triggered bash.
*whispers back* I'm still a noob; I don't know exacly what a bash trigger is

The custom script that is supposed to clear the leak might cause problems. It doesn't clear the leak as the Pick units in region matching condition does not set last created unit group.

Use set bj_wantDestroyGroup before the unit group pick to correctly clear the leak.
Like this?
  • TimeLock
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in LockedUnits and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Time lock ) Equal to False
            • Then - Actions
              • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
              • Unit Group - Remove (Picked unit) from LockedUnits
            • Else - Actions
      • Custom script: bj_wantDestroyGroup(ChGroup)
      • Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Time lock ) Equal to True)) and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Unit Group - Add (Picked unit) to LockedUnits
The trigger has crashed :goblin_boom:

Btw, there is no pausing or stunning in this trigger. How is the unit supposed to be stunned if theres no stun applied?
o_O I think you have point. There is no stun/pause in the trigger or the ability but I'm pretty sure as I'm typing now that that the time lock ability works. Maby there is a lost trigger somewhere that pauses the unit. I'll clean up my triggers and let you know tomorrow.
 
Status
Not open for further replies.
Top