[Trigger] Timers

Status
Not open for further replies.
Level 1
Joined
Jan 9, 2011
Messages
4
Timers - Please move to sc2 section

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
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Yes, you are calling nonsense functions.

spawntimer = (TimerCreate()) <timer>
timerwindow <TimerWindow>
Very strange syntax you use here...

TimerWindowCreate(spawntimer, "Wave 1 - Infestors", true, false)
TimerWindowSetTimer(timerwindow, spawntimer)
Both these functions do not exist...

TimerWindowSetTitle(timerwindow, "Wave 2 - Drones in...")
Does not also exist...

TimerStart(spawntimer, 120.0, false, c_timeGame)
c_timeGame is not a function, it has to be the syntax...
TimerStart(spawntimer, 120.0, false, function c_timeGame)

In Warcraft III, you are after TimerDialog, not TimerWindow....
native CreateTimerDialog takes timer t returns timerdialog
native DestroyTimerDialog takes timerdialog whichDialog returns nothing
native LoadTimerDialogHandle takes hashtable table,integer parentKey,integer childKey returns timerdialog
native SaveTimerDialogHandle takes hashtable table,integer parentKey,integer childKey,timerdialog whichTimerdialog returns boolean
native TimerDialogDisplay takes timerdialog whichDialog,boolean display returns nothing
native TimerDialogSetRealTimeRemaining takes timerdialog whichDialog,real timeRemaining returns nothing
native TimerDialogSetSpeed takes timerdialog whichDialog,real speedMultFactor returns nothing
native TimerDialogSetTimeColor takes timerdialog whichDialog,integer red,integer green,integer blue,integer alpha returns nothing
native TimerDialogSetTitle takes timerdialog whichDialog,string title returns nothing
native TimerDialogSetTitleColor takes timerdialog whichDialog,integer red,integer green,integer blue,integer alpha returns nothing

This is the warcraft III trigger and scripts section, this does not cover help for StarCraft 1 or 2.
If you need help with StarCraft 2, then post in the correct StarCraft 2 editor helpzone section.
 
Level 1
Joined
Jan 9, 2011
Messages
4
Oh shit, just realized... I posted this in the WCIII section. My bad, can someone please move to sc2.
~lilneo
 
Status
Not open for further replies.
Top