• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Timers

Status
Not open for further replies.
Level 1
Joined
Jan 9, 2011
Messages
4
Okay so I'm making a copy of the bunker defense 10-way game in sc1 and I am making a countdown timer. Each level, I want to change the name of the timer but it's just not working.
Here's my triggers:
Code:
//Globals...
spawntimer = (TimerCreate()) <timer>
timerwindow <TimerWindow>

//Initiate...
TimerStart(spawntimer, 120.0, false, c_timeGame)
TimerWindowCreate(spawntimer, "Wave 1 - Infestors", true, false)
TimerWindowSetTimer(timerwindow, spawntimer)

//After level 1
TimerWindowSetTitle(timerwindow, "Wave 2 - Drones in...")
Okay so the timer works, level 1 spawns and all but then it doesn't change the name of the timer. Anyone know what I'm doing wrong?
~lilneo
 
Level 2
Joined
Jan 10, 2011
Messages
6
after your three lines in Initiate:
Code:
TimerStart(spawntimer, 120.0, false, c_timeGame)
TimerWindowCreate(spawntimer, "Wave 1 - Infestors", true, false)
TimerWindowSetTimer(timerwindow, spawntimer)

you need another action, which would be set Variable-> timerwindow to Last created timer window

this is because when you did:
Code:
TimerWindowCreate(spawntimer, "Wave 1 - Infestors", true, false)
this DID make a timer window for your timer and gave it a title and such, but your variable timerwindow is not pointing to the "Last created timer window". So when you tried to set the title in After level 1 using the variable timerwindow it did change the title of that variable but it didn't effect the timer window you created for spawntimer, as you can see when testing your map.

now, for giving help can you please tell me how you can view select triggers in the "raw data" or what appears to me like java code? ...so that I can too post my triggers as you did
 
Level 1
Joined
Jan 9, 2011
Messages
4
howto.png

And thanks so much, I knew this rule too because I had a leaderboard, I guess I just forgot. Thanks.
~lilneo
 
Status
Not open for further replies.
Top