• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Game time

Status
Not open for further replies.
Level 5
Joined
Jun 17, 2006
Messages
114
personally i dont know of a blizzard-made trigger to count game time but you might try using a trigger that starts at 0 and increases by 1 every second, then use that to display the game time elapsed (doing the conversions to minutes, seconds, hours, or whatever of course).
 
Level 3
Joined
Aug 3, 2006
Messages
45
OK i knowthat is a time that i post this topic and i want that all people know how to do this. If found it out and now i write the trigger here. I think im not the onliest person who want to know this so heres the trigger:
First make some Variables:
Game_Time - Timer
Game_Minutes - Integer
Game_Seconds - Integer
Than first start Gama Time that will look like something like this:

Events:
Map Intialisation
Conditions
None
Actions

Countdown-Timer - Start Game_Time as a Unique timer that will expire in 1000000000.00 seconds

So now you have started the Timer so lets go to the other trigger:


Events
Time - Every 1.00 seconds of game time
Conditions
None
Aktionen
Set Game_Minutes = ((Integer((Elapsed time for Game_Time))) / 60)
Set Game_Seconds = ((Integer((Elapsed time for Game_Time))) mod 60)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
Game_Seconds bigger as 10
'THEN'-Aktionen
Leaderboard - Change the title of (Last created leaderboard) to ((String(Game_Minutes)) + :) + ((String(Game_Seconds))
'ELSE'-Aktionen
Leaderboard - Change the title of (Last created leaderboard) to ((String(Game_Minutes)) + :)0 + ((String(Game_Seconds))
This two actions you can make to what you want.
 
Status
Not open for further replies.
Top