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

Unit Group Pausing

Status
Not open for further replies.
Level 6
Joined
Dec 9, 2008
Messages
233
How can i pause every unit in unit group? I can choose only first unit in unit group

Unit - Pause (triggering unit) i only can choose one unit with this action
 
Level 6
Joined
Dec 9, 2008
Messages
233
I need to use unpause action in another section of trigger, which isnt under pick units. Will that still affect those picked units?
 
Level 6
Joined
Dec 9, 2008
Messages
233
Okay i made a spell which stuns all units within 400 range of caster for X seconds. I made unitgroup but i cant choose it as variable when i want to unpause unit.
 
Level 10
Joined
Oct 5, 2008
Messages
355
Unpause/Pause [Insert Unit here] does only affect the inserted unit, no matter how many other units are paused, so this should not affect your in the [pick units] action paused units, except you unpause one of them with the trigger or you pick the whole group again and unpause them all, if this is what you wanted to know.

Edit: Oh you already replied to that, i rewrite my reply...
 
Level 10
Joined
Oct 5, 2008
Messages
355
Darkgroom was wright with this reply, maybe i misunderstood you and confues you, sorry for this.

Pick every unit works the nearly following way:

It picks every unit, one by one, and runs the actions on them. So picked Unit refers to the currently picked unit, which is, because the pick every unit action here got no wait (Which would be fatal for the trigger), in fact all units, except it is stopped by something.

Edit: Ah, now i understand where i made my mistake last time. I meant that the next pause or unpause unit action won't affect the before in the pick every unit event units paused ones, if they are not the inserted value.
 
Level 6
Joined
Dec 9, 2008
Messages
233
Yeah i knew how pick every unit works, I use that function all the time. I just wondered if i can pause a unit group, lets call it UnitGroup variable.

And i cant use wait actions within pick every unit? Didnt know that.
 
Level 10
Joined
Oct 5, 2008
Messages
355
Yeah, picking a group and run a wait trigger would cause that the first unit is picked, some actions would be made, the wait trigger rund, some actions would be made, and then the next unit is picked and the same is made and so on. The system can't apply single unit events on groups, like pause unit, it needs to pick every single one and apply the actions on them, this is the principle of pick every unit.
 
Level 6
Joined
Dec 9, 2008
Messages
233
Okay I'll go test now to see if this works

EDIT: Didnt go as i suspected :D

How can unpause those picked units in another trigger? If i set add picked units to unit group, i cant use this unit group to unpause function..

EDIT 2: I figured it out..I just pick them again :) Ill check if that works

EDIT 3: Okay works perfectly except special effects arent destroyed after stun expires..I made a timer and when that timer expires units are unpaused but special effect isnt destroyed..and i made action

Special Effect - Destroy (MyEffect)

I think i found out the reason: it only destroys the last special effect which was created. How can i put them in a whole group and destroy them all?
 
Last edited:

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
Okay I'll go test now to see if this works
EDIT 2: I figured it out..I just pick them again :) Ill check if that works

hey that was what i was trying to say!
you need the unitgroup to do it on all units no matter what

anyway, you need to store the special effect into a variable or hashtable to remove it
 
Level 6
Joined
Dec 9, 2008
Messages
233
Hashtable! I've heard so many about it but I don't know what it is..and can I store more than one special effect into it?

I stored with variable and it only stores one effect so when i call function destroy special effect it only destroys that one
 
Status
Not open for further replies.
Top