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

[Trigger] Pause Unit, Remember Last Order

Status
Not open for further replies.
Hello! Thanks for stopping by. I'm wondering if anyone knows how to accomplish the following via GUI or Jass.

When a unit is paused it will remember it's last order and continue it upon being unpaused. I'm currently using this to allow players in my game to queue spells by pausing them upon an attempt to cast a second spell while the first is still casting, once the first is done they become unpaused and begin casting the 2nd one. So far it works great, but when a unit becomes paused their entire UI blacks out which doesn't look that good in game when the unit will be casting many spells.

So, the question: Is there a way to prevent the UI blackout during pause, or, is there another way to "capture" a unit order and save it for later? I'd be more than happy to make my own loop that tells it when to start the next spell, but I don't know how to save a specific order and call it back later.

I love you all my friends and the fact these questions are so frequently answered is amazing. Please don't hesitate to ask for my help or a reward in turn.



(I noticed browsing the forums that you two have the experience I think would solve this, and Pyrogasm frequently is knowledgeable)

@TriggerHappy
@DrSupergood
@Pyrogasm
 
I’m not sure of any way to stop the blackening, but if it’s a UI element, @Tasyen might have an idea about how to avoid/subvert it.
I showed the commandbuttons while pausing the unit but they had no tooltips and when I clicked the divine shield button for the paused paladin the game crashed as soon the paladin was unpaused. The unpausing was done with an esc-Key event trigger.

In Reforge beta (state custom game released) I failed to show the paused unit's command buttons.
 
Level 9
Joined
Jul 30, 2018
Messages
445
I used to use unit pause as well, but after some time I decided it's not a good idea. Instead, make a dummy unit and just stun the units: it works just the same, orders stay on and the units remember what they were doing and you can even queue new orders while they are stunned, because you can see the command card.

Pause unit also seems to work a bit inconsistently, like units not always pausing or unpausing. Also there are some bugs when other units try to interact with paused units, like glitches in paused unit's death animation if killed when paused, as well as buff durations, spell cooldowns and things like that. So, I wouldn't recommend using paused units that often.
 
Status
Not open for further replies.
Top