Is it possible to get a summoned unit's remaining time?

Bogrim

y hello thar
Reaction score
154
I have a spell that temporarily steals an enemy unit. For summoned units, I wish to pause the expiration timer and resume it once the spell is over. Stopping the expiration timer is the simple part, but resuming it from the moment it was currently at is a bit more difficult.

Is there a way to get an expiration timer's remaining time without creating a countdown timer for every summoned unit?
 

Jedi

New Member
Reaction score
63
Convert real to string > Countdown timer functions.

Trigger:
  • Actions
    • Game - Display to (All players) the text: (String((Elapsed time for Timer)))
    • Game - Display to (All players) the text: (String((Remaining time for Timer)))
 

Bogrim

y hello thar
Reaction score
154
I think you misunderstood my question. I'm not looking for to display the time for a trigger started timer, but the real value of the expiration timer that summoned units have when you create them with an ability. You know, the purple bar with a text over, such as "Force of Nature", "Animate Dead" or "Summoned Unit".
 

Jedi

New Member
Reaction score
63
Oh sorry,

Edit:You know jass?

this will pause expiration timer.
Trigger:
  • Custom script: call UnitPauseTimedLife(udg_unit, true)


this will resume
Trigger:
  • Custom script: call UnitPauseTimedLife(udg_unit, false)


Nevermind, I found a GUI one:
Trigger:
  • Unit - Pause the expiration timer for (Summoned Unit)
 

Bogrim

y hello thar
Reaction score
154
Thank you guys, but that's not what I'm asking for. I already use another expiration timer during the spell's duration so pausing the previous expiration timer isn't going to work.

You asked how I stopped the expiration timer this way: I replaced the unit with itself.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top