Page 1 of 1
clock timer override
Posted: Wed Nov 18, 2009 12:07 pm
by Killerdude
Maybe someone can help with this..
I would like to intercept the call to axiswin/allieswin when the clock time runs out. In my map the defending team still needs to do something to win.
Most scripts just have level waittill axiswin. By the time this happens I am pretty sure its to late prevent an axis win. Am I wrong?
Thanks for any help.
Posted: Wed Nov 18, 2009 8:37 pm
by SA007
What kind of thing do de need to do after the time is up?
- Is it timed?
- Is it bomb related?
- Etc.
The only way i know to not end the game when the time is up is "A bomb is still set" message.
I think it should be possible to change that text to something else with sufficient modifications.
But what is the goal of this idea?
Posted: Wed Nov 18, 2009 11:34 pm
by Killerdude
In my map the allies need to blow up the V2 rocket located inside a building. The building has a roof over it with launch doors controlled by a lever. By default the doors are closed. The Axis need to open the launch doors, keep them open and prevent the allies from planting the bombs. The allies could win by planting the bomb or keeping the doors closed so the rocket will not launch when the time runs out.
The launch door state is stored in the variable
level.launchdoor_status = 0 // 0 **closed** or 1 **open**
So basically I want to check when the time runs out to see if the doors are closed and if they are call teamwin allies.
Posted: Thu Nov 19, 2009 10:42 am
by jv_map
Hmm you could use, after level waittill roundstart:
level.clockside = allies
Then when the doors are opened:
level.clockside = axis
.. should the doors be closed again:
level.clockside = allies
etc.
Alternatively you can find the time remaining like this:
level waittill roundstart
level.roundstarttime = level.time
(..)
local.time_remaining_secs = level.dmroundlimit * 60 + level.roundstarttime - level.time
Posted: Thu Nov 19, 2009 10:57 pm
by Killerdude
Looks like a couple good options. The clockside toggle seems like a simple solution. Let me see what I can do.
Thanks jv