• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Will this break? or work?

Status
Not open for further replies.
Level 4
Joined
Jun 13, 2014
Messages
77
I'm curious if two people cause this to go off at the same time will it leak?

  • reflect dmg
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Sleep (Stun) ) Equal to (==) True
    • Actions
      • Set Reflectpoint = (Position of (Attacking unit))
      • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 1000.00)
      • Special Effect - Create a special effect at Reflectpoint using Abilities\Spells\Undead\Impale\ImpaleMissTarget.mdl
      • Set Reflectsfx = (Last created special effect)
      • Wait 1.00 seconds
      • Special Effect - Destroy Reflectsfx
      • Custom script: call RemoveLocation( udg_Reflectpoint )
 
So with a unit creation it wont leak though? and will work with multiple people?

heres what i got now

  • reflect dmg
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Sleep (Stun) ) Equal to (==) True
    • Actions
      • Set Reflectpoint = (Position of (Attacking unit))
      • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 1000.00)
      • Unit - Create 1 Reflect Impale Effect for Neutral Hostile at Reflectpoint facing Default building facing (270.0) degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation( udg_Reflectpoint )
 
  • reflect dmg
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Sleep (Stun) ) Equal to (==) True
    • Actions
      • Custom script: local location loc
      • Custom script: local effect e
      • Set Reflectpoint = (Position of (Attacking unit))
      • Custom script: set loc = udg_Reflectpoint
      • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 1000.00)
      • Special Effect - Create a special effect at Reflectpoint using Abilities\Spells\Undead\Impale\ImpaleMissTarget.mdl
      • Custom script: set e = bj_lastCreatedEffect
      • Wait 1.00 seconds
      • Custom script: call DestroyEffect( e )
      • Custom script: call RemoveLocation( loc )
 
  • reflect dmg
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) has buff Sleep (Stun) ) Equal to (==) True
    • Actions
      • Custom script: local location loc
      • Custom script: local effect e
      • Set Reflectpoint = (Position of (Attacking unit))
      • Custom script: set loc = udg_Reflectpoint
      • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) - 1000.00)
      • Special Effect - Create a special effect at Reflectpoint using Abilities\Spells\Undead\Impale\ImpaleMissTarget.mdl
      • Custom script: set e = bj_lastCreatedEffect
      • Wait 1.00 seconds
      • Custom script: call DestroyEffect( e )
      • Custom script: call RemoveLocation( loc )

Mind explaining the things you added and why they are necessary? it may be relevant to how i trigger in general maybe im creating leaks
 
WereElf's solution uses a local variables. I'm not sure if the local variables can get bugged out if being run multiple times.

Local variables DON'T get overwritten.

Anyways.. there's nothing wrong with your code now.. I'm just telling you how you can do it, without having to make a special dummy (with model = the effect you want), every time you want an effect to last x seconds..
 
Status
Not open for further replies.
Back
Top