clock timer override

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Killerdude
Sergeant Major
Posts: 110
Joined: Fri May 11, 2007 12:16 am

clock timer override

Post 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.
[Rome wasn't mapped in a day!]
SA007
Lance Corporal
Posts: 24
Joined: Thu Sep 03, 2009 10:17 pm

Post 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?
Killerdude
Sergeant Major
Posts: 110
Joined: Fri May 11, 2007 12:16 am

Post 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.
[Rome wasn't mapped in a day!]
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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
Image
Killerdude
Sergeant Major
Posts: 110
Joined: Fri May 11, 2007 12:16 am

Post 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
[Rome wasn't mapped in a day!]
Post Reply