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

[General] Set game time

Status
Not open for further replies.
Level 3
Joined
Apr 16, 2013
Messages
33
I was hoping to make a trigger that would set game time to a substring a player would type up; however, I'm unable to do this in GUI. I've also tried setting time according to the life of a dummy unit, yet that did not work either. How's the best way to set game time to a custom string? For example: the player is playing at 10:00am, so he/she would enter 10.00 to set the game time to 10:00am.

Thanks.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
  • Events
    • Player - <player> types a chat message containing <Empty string> as Partial Matching
  • Conditions
  • Actions
    • Set mins = ((Real((Entered chat string))) mod 1.00)
    • Set hours = ((Real((Entered chat string))) - mins)
    • Set mins = (Min((mins x 100.00), 59.00))
    • Game - Set the time of day to (hours + (mins / 60.00))
 
Status
Not open for further replies.
Top