HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Timer Bug

02-27-2006, 03:11 AM#1
Eternal_Dread
For some reason, this trigger won't show the time passing by on the timer window.
Trigger:
Time Limit 2
Collapse Events
Player - Player 1 (Red) types a chat message containing -15 as An exact match
Player - Player 1 (Red) types a chat message containing -25 as An exact match
Player - Player 1 (Red) types a chat message containing -35 as An exact match
Player - Player 1 (Red) types a chat message containing -45 as An exact match
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -15
Collapse Then - Actions
Countdown Timer - Start (Expiring timer) as a One-shot timer that will expire in 900.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -25
Collapse Then - Actions
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 1500.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -35
Collapse Then - Actions
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 2100.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -45
Collapse Then - Actions
Countdown Timer - Start (Last started timer) as a One-shot timer that will expire in 2700.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Else - Actions
Set time = (Last started timer)
Any ideas why?
02-27-2006, 03:21 AM#2
Vexorian
(Expiring Timer) is not a valid event response for chat events
02-27-2006, 03:30 AM#3
Eternal_Dread
I changed it to a different response, all it shows is this:
02-27-2006, 04:33 AM#4
Chuckle_Brother
Post some code dude
02-27-2006, 10:51 AM#5
RaptorTeak
Mmmhh.... I am not sure it's necessary, but I see nowhere "Timer - Show timer for All players" or something. Maybe would it fix a little more your trigger.

Also you should do : (sry I don't know how to use the [trigger] tags)
Trigger:
Time Limit 2
Collapse Events
Player - Player 1 (Red) types a chat message containing -15 as An exact match
Player - Player 1 (Red) types a chat message containing -25 as An exact match
Player - Player 1 (Red) types a chat message containing -35 as An exact match
Player - Player 1 (Red) types a chat message containing -45 as An exact match
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -15
Collapse Then - Actions
Countdown Timer - Start timer as a One-shot timer that will expire in 900.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -25
Collapse Then - Actions
Countdown Timer - Start timer as a One-shot timer that will expire in 1500.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -35
Collapse Then - Actions
Countdown Timer - Start timer as a One-shot timer that will expire in 2100.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Entered chat string) Equal to -45
Collapse Then - Actions
Countdown Timer - Start timer as a One-shot timer that will expire in 2700.00 seconds
Countdown Timer - Create a timer window for (Last started timer) with title Game Time Left
Countdown Timer - Change the color of the time for (Last created timer window) to (100.00%, 80.00%, 20.00%) with 0.00% transparency
Else - Actions
Set time = (Last started timer)
Countdown Timer - Show (Last Created Timer Window)

Notice that you have to set the variable "timer", that I used for that Start Action, Start "timer". You can use another variable if you want to.

Your trigger can't simply work, because you want to start the timer "Expiring timer". It's simply not possible, because Expiring Timer is an event answer, and so in your event you should have been put "timer expires" or something, then this would have been possible.

Anyway, try with my method, I think It'll work :).
02-28-2006, 12:49 AM#6
PerfectlyInsane
You got it in the wrong order. You cant start a Timer when it doesn't exist.


Trigger:
Countdown Timer - Create a timer window for Timer45 with title Helicopter ETA
Countdown Timer - Start Timer45 as a One-shot timer that will expire in 2700.00 seconds

Timer45 is a Timer array, and why are u nestling the IFs?






If you want something more elegant than a "-15" you can use a dialog box
---------------------------------------------------------


-------- DialogBox --------
Trigger:
Dialog - Create a dialog button for GameLengthDialogbox labelled 30 Minutes (Normal ...
Set Minute30 = (Last created dialog Button)
Dialog - Create a dialog button for GameLengthDialogbox labelled 45 Minutes (Meduim ...
Set Minute45 = (Last created dialog Button)
Dialog - Create a dialog button for GameLengthDialogbox labelled 60 Minutes (Hard En...
Set Minute60 = (Last created dialog Button)
Dialog - Show GameLengthDialogbox for (Triggering Player) <--Change this to red

-------------------------------------------------
Trigger:
DialogDetect2
Collapse Events
Dialog - A dialog button is clicked for GameLengthDialogbox
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Minute30
Collapse Then - Actions
Trigger - Turn off DialogCloser <gen>
Set HasPlayerselected = 2
Game - Display to (All players) the text: 30 minutes was sele...
Dialog - Hide GameLengthDialogbox for (Triggering player)
Sound - Play WelcomeTo1 <gen>
Wait 5.75 seconds
Sound - Play jpark <gen>
Wait 40.00 seconds
Trigger - Run CreatingResources <gen> (ignoring conditions)
Wait 10.00 seconds
Countdown Timer - Create a timer window for Timer30min with title Helicopter ETA
Countdown Timer - Start Timer30min as a One-shot timer that will expire in 1800.00 seconds
Skip remaining actions
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Minute45
Collapse Then - Actions
Trigger - Turn off DialogCloser <gen>
Set HasPlayerselected = 2
Game - Display to (All players) the text: 45 minutes was sele...
Dialog - Hide GameLengthDialogbox for (Triggering player)
Sound - Play WelcomeTo1 <gen>
Wait 5.75 seconds
Sound - Play jpark <gen>
Wait 40.00 seconds
Trigger - Run CreatingResources <gen> (ignoring conditions)
Wait 10.00 seconds
Countdown Timer - Create a timer window for Timer45 with title Helicopter ETA
Countdown Timer - Start Timer45 as a One-shot timer that will expire in 2700.00 seconds
Skip remaining actions
Collapse Else - Actions
Do nothing
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Clicked dialog button) Equal to Minute60
Collapse Then - Actions
Trigger - Turn off DialogCloser <gen>
Set HasPlayerselected = 2
Game - Display to (All players) the text: 60 minutes was sele...
Dialog - Hide GameLengthDialogbox for (Triggering player)
Sound - Play WelcomeTo1 <gen>
Wait 5.75 seconds
Sound - Play jpark <gen>
Wait 40.00 seconds
Trigger - Run CreatingResources <gen> (ignoring conditions)
Wait 10.00 seconds
Countdown Timer - Create a timer window for Timer60 with title Helicopter ETA
Countdown Timer - Start Timer60 as a One-shot timer that will expire in 3600.00 seconds
Skip remaining actions
Collapse Else - Actions
Do nothing