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

[Stop Time] Basic, Fast and Easy

Status
Not open for further replies.
Level 7
Joined
Jul 14, 2006
Messages
292
Hi there! This is my Stop Time ability! I suggest it to someone here so I decided to give it as a Tutorial too for those who want it!

For the Stop time you only need an "Unit Group" Variable and nothing else. Call it as you like but I'd call it StopUnits. No other group are necesarry cause no other unit will be able to use the ability as they will be stuck too.

Use the ability Thunder Clap and change the values to make it damageless.

Now in a Trigger do this:

Event
A unit (Finnish casting an ability)
Condition
(Ability being cast) Equal to (Your ability based on Thunderclap)
Actions
Unit Group - Pick every unit in (Units in(Playable map area)) and do (Unit Group - Add (Picked Unit) to (StopUnits))
Unit Group - Remove (Casting Unit) from (StopUnits)
Unit Group - Pick every unit in (Stop Units) and do (Animation - Change (Picked Unit)'s animation speed to 0.00% of its original speed)
Unit Group - Pick every unit in (Stop Units) and do (Unit - Pause (Picked Unit))
Unit Group - Pick every unit in (Stop Units) and do (Unit - Pause the expiration timer for (Picked Unit))
Wait (Duration of the Stop Time ability you want) seconds
Unit Group - Pick every unit in (Stop Units) and do (Unit - Unpause (Picked Unit))
Unit Group - Pick every unit in (Stop Units) and do (Unit - Unpause the expiration timer for (Picked Unit))
Unit Group - Pick every unit in (Stop Units) and do (Animation - Change (Picked Unit)'s animation speed to 100.00% of its original speed)
Unit Group - Remove all units from (StopUnits)



And you have your Stop Time!
This ability maygive problem to map using trigger to spawn unit as they will need to stop those trigger with this Stop Time trigger. But still I think it will be easy for them to figure a way out.

From MetalWarrior :infl_thumbs_up:
 
Last edited:
Level 7
Joined
Jul 14, 2006
Messages
292
Loop are not better they cause bug when more than 1 are running in the same time, (Since the start of Warcraft III editor). And it's a little more laggy than no Loop.

Anyway, even if Loops create no lag or have no bug, this trigger still work perfectly on map with no spawning. And tell me why it would make a position leak in 0.001 second if the unit is paused? I'm sorry but I don't think my spell as any leak except for map that have triggers to spawn creep which will need to be stopped. But it will still be easy to find a way out of this...
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
Well the question of mine did not actually require an answer since i know for a fact loops are not 'buggy'. I've run 7 loops at the same time (every 0.05 sec) and they have never bugged. And where do you base the assumption that a loop is laggy? Loops are just a way to do something multiple times in one line. Using the create unit action 10 times in a row and using one loop (that runs 10 times) to create one unit is the same.

You kinda lost me with your second paragraph. Maybe you are not quite sure what leaks are, here's a good tutorial about them: http://www.thehelper.net/forums/showthread.php?t=27242
 
Level 7
Joined
Jul 14, 2006
Messages
292
You mean that the fixed version of my spell would be:

Event
A unit (Finnish casting an ability)
Condition
(Ability being cast) Equal to (Your ability based on Thunderclap)
Actions
Set StopUnits = (unit in (Units in(Playable map area))
Unit Group - Remove (Casting Unit) from (StopUnits)
Unit Group - Pick every unit in (Stop Units) and do (Animation - Change (Picked Unit)'s animation speed to 0.00% of its original speed)
Unit Group - Pick every unit in (Stop Units) and do (Unit - Pause (Picked Unit))
Unit Group - Pick every unit in (Stop Units) and do (Unit - Pause the expiration timer for (Picked Unit))
Wait (Duration of the Stop Time ability you want) seconds
Unit Group - Pick every unit in (Stop Units) and do (Unit - Unpause (Picked Unit))
Unit Group - Pick every unit in (Stop Units) and do (Unit - Unpause the expiration timer for (Picked Unit))
Unit Group - Pick every unit in (Stop Units) and do (Animation - Change (Picked Unit)'s animation speed to 100.00% of its original speed)

Custom Script: call DestroyGroup(udg_StopUnits)


Is that what you mean about leaks? Cause it's new for me then...
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
Well almost (was bored so i re-created your trigger with leaks fixed)

  • time freeze
    • Events
    • Conditions
    • Actions
      • Set StopUnits = (Units in (Playable map area))
      • Unit Group - Remove (Casting unit) from StopUnits
      • Unit Group - Pick every unit in StopUnits and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
          • Unit - Pause (Picked unit)
          • Unit - Pause the expiration timer for (Picked unit)
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Wait 3.00 seconds
      • Unit Group - Pick every unit in StopUnits and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
          • Unit - Unpause (Picked unit)
          • Unit - Unpause the expiration timer for (Picked unit)
          • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call DestroyGroup(udg_StopUnits)
You should read the tutorial which I gave a link in my previous post to learn about leaks and how to fix them. Not every leak need to be cleaned, but especially in spells which you use multiple times in a game, its important to clean the leaks.
 
Status
Not open for further replies.
Top