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

Countdown timer on specific units

Status
Not open for further replies.
Level 5
Joined
Feb 18, 2016
Messages
96
I saw it on the pudge wars map and i loved it
How can i create something like that?
 

Attachments

  • countdown.jpg
    countdown.jpg
    229.3 KB · Views: 93
Level 29
Joined
Sep 26, 2009
Messages
2,595
I don't see any countdown timers?
Perhaps you mean the whole table on the upper right corner, that's multiboard. Here check this tutorial: http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/all-about-multiboards-84942/

What happens in the map is that when a unit dies, the game checks who the killer belongs to and increases the value by 1 in his score. Since the system is MPI (multi player instanceable), you use players' numbers as indices to all related arrays.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
I think he means the text tag above the unit, currently showing "3!".

To do something like this, you need two triggers.

Outline:
The first starts a timer, that you have to save to a variable
The second trigger has to fire every time, the timer in the variable expires (event).
Create a floating text above the unit, in the second trigger.
 
Level 29
Joined
Sep 26, 2009
Messages
2,595
I think he means the text tag above the unit, currently showing "3!".
Wow, until you wrote it, I didn't even see it. I mean brown text on a grass/dirt terrain and behind health bar xD I don't understand how you could even see that, but good job :)


Outline:
The first starts a timer, that you have to save to a variable
The second trigger has to fire every time, the timer in the variable expires (event).
Create a floating text above the unit, in the second trigger.
I would like to just expand on this a bit.

First, depending on how many units you want this for, it may be better if you simply use one trigger with periodic event instead of timers.

Second, before creating new floating text, use an action to destroy the old one first. E.g. this action:
  • Floating Text - Destroy *your floating text*
The reason is that there is a limit to how many floating texts you can have in game at once. The number is 100. So if you are updating your floating texts way too quickly for way too many units without destroying the old floating text (instead of destroying you wait for their lifespan to expire), you can hit the limit.
 
Status
Not open for further replies.
Top