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

Mass Stasis

Your first challenge will be to figure out how to pause and invuln units in a way that stacks and respects multiple timers

I recently wrote some code like this so it's pretty fresh in my mind

Take a look at



To get your brain going. Let me know if you need some more hints
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
Mass Stasis
My lich needs a spell which pauses and makes invulnerable a group of units in a X radius for Y seconds.
This needs to work with an unlimited number of liches. PLEASE help me.
You could use basic indexing techniques like Unit Indexing. See the attached map.

You'll find that Unit Indexing and Dynamic Indexing are almost always going to be the solution to your custom GUI spells. These should be your starting point whenever you're unsure of what to do.

Notes:
1) Pausing/Unpausing has no concept of "instances". It's easy for outside triggers to interfere and Unpause a unit early. You would need to implement a system that tracks the number of Pauses on a unit, like a counter -> +1 Pause, -1 Pause, to have full control over this function.
2) The same is true for Setting the animation speed of a unit. You would need to implement some kind of system that returns a unit back to it's intended speed (similar idea as above).
3) The Unit Indexer used in the attached map will recycle unused custom values. This shouldn't be an issue for a spell like this but it's something to take into consideration if you use the technique elsewhere.
 

Attachments

  • Mass Stasis 1.w3m
    25.5 KB · Views: 5

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,871
JASS:
native BlzPauseUnitEx takes unit whichUnit, boolean flag returns nothing
:emote_grin:
Yeah, I thought about stunning the targets as well, but when I think of a stasis effect I think it's the rare case where you may actually want to Pause the units, buffs and timers included.
 
Top