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

Freeze Spell

Status
Not open for further replies.
Level 3
Joined
Feb 20, 2008
Messages
54
So the idea is like this, a unit casts breath of frost and the units that are damaged by it will be freezed for 0.5 seconnds, the only problem is that they won't defreeze(I mean unpause)...
  • Events
  • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
  • Unit Group - Pick every unit in (Units in Rect 012 <gen>) and do (Actions)
  • Loop - Actions
  • If (All Conditions are True) then do (Then actions) else do (Else Actions)
  • If - conditions
  • ((Picked unit) has buff Breath of Frost(freeze)) equal to True
  • Then - Actions
  • Unit - Remove Breath of Frost (freeze) buff from (Picked Unit)
  • Unit - Pause (Picked Unit)
  • Advanced - Create Attach Point - Overhead of (Picked Unit) the Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl effect lasting 0.50 seconds
  • Wait 0.50 seconds
  • Unit - Unpause (Picked Unit)
What's the problem?
 
When in the trigger editor press Ctrl+B to bring up the variable editor.
Add a new variable with the name FreezeGroup and type "Unit Group".

  • Events
  • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
  • Unit Group - Pick every unit in (Units in Rect 012 <gen>) and do (Actions)
  • Loop - Actions
  • -------- Added this: --------
  • Unit Group - Add (Picked unit) to FreezeGroup
  • If (All Conditions are True) then do (Then actions) else do (Else Actions)
  • If - conditions
  • ((Picked unit) has buff Breath of Frost(freeze)) equal to True
  • Then - Actions
  • Unit - Remove Breath of Frost (freeze) buff from (Picked Unit)
  • Unit - Pause (Picked Unit)
  • Advanced - Create Attach Point - Overhead of (Picked Unit) the Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl effect lasting 0.50 seconds
  • Wait 0.50 seconds
  • Unit - Unpause (Picked Unit)
  • -------- Added this: --------
  • Unit Group - Remove all units from FreezeGroup
Notice the "Unit Groups", though this is a so called Global Variable and will only work properly as long as multiple heroes aren't casting the spell at the same time.

And btw, it "leaks". Probably does not matter in this case anyway.
 
  • Events
  • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
  • set local unit u = Unit
  • set Unit = Picked unit
  • Unit Group - Pick every unit in (Units in Rect 012 <gen>) and do (Actions)
  • Loop - Actions
  • If (All Conditions are True) then do (Then actions) else do (Else Actions)
  • If - conditions
  • ((Unit) has buff Breath of Frost(freeze)) equal to True
  • Then - Actions
  • Unit - Remove Breath of Frost (freeze) buff from (Unit)
  • Unit - Pause (Unit)
  • Special Effect - Overhead of (Unit) the Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
  • Special Effect - Destroy (Last created) Special effect
  • Wait Gametime - 0.50 seconds
  • Unit - Unpause (Unit)
  • set u = null
I think it should be something like this, but correct me if i'm wrong by setting "Unit" I'm not sure what is first local or global...
And btw. you are leaking a location there.
 
Why not just create a periodic trigger that checks every .1 second for any units with a buff (make a Breath of Frost buff, it is just for checking) and create a dummy unit and order it to cast some stun spell on the unit.

That's like 10x more complicated then just casting a 100% slow spell with frost buff? xD
Cmon, stop being complicated!!!! o.O
 
I had to make another trigger to make the unpause work, because it still didn't work in the end but all that counts is that in the end I managed to get it working the only problem is that the special effect lasts too much...
 
Why are you guys being so complicated?
Btw, avoid waits in custom spells it can bug.

Just create a dummy for each unit that got hit (loop it?) add slow with 10o% to it. And set duration of that slow to 0.5 seconds. Voala.

This.

Ockham's Razor applies.
 
Status
Not open for further replies.
Back
Top