PDA

View Full Version : Adding a map-ends thread to SCR files?


Mr_nStuff
11-21-2002, 05:34 PM
Anyway to call a script, thread, or specify to run a script at the end of a map? (timelimit expired)

Example
[code:1]level.end.script="maps/obj/MP_Druckkammern_TOW-end.scr"[/code:1] If I could add something like this to each maps scr file. I could set the gametype, spawn_interval, and roundlimit for the next map before the next map even loads.

There has to be a way..

How do map scripts work? Do they only run once at the beginning of the map load? Do they loop during the game? If they loop. Maybe we could add something like this to the end of the script?
[code:1]if( level.end )
{
setcvar "g_gametype" "5"
setcvar "sv_team_spawn_interval" "15"
setcvar "roundlimit" "0"
}[/code:1] So the next map will already be set to go before it ever even loads.

Possible? Don't know? Tried everything already? If we can do this somehow. We can stop that infamous spectator-bump bug in it's tracks.

What scr file is making the screen fade-to-black and volume fading at the end of the map?

Thanks.

UGC-Booter
11-22-2002, 09:18 AM
Does this work? Did you find away to make the script work?
Please post you results
thanks :D

Mr_nStuff
11-22-2002, 02:45 PM
Well without any help so far.. I am getting close.. I'm basically going through a bunch of scripts.. and running very little tests.. I don't have the ability to just reboot my server right now..

Basically what i've found out so far.. map scripts are executed once per round. So I can ... If I find the golden function. I can make the scripts load cvars at the end of the timelimit. I know this is possible. Still messin with it..

I've also seen MOHAA servers.. Where at the end of the timelimit.. When the screen goes black.. They have some mod on that makes everyone that's dead at the end, come back to life.. If I can find out where they are doing this. I can accomplish my goal.

Dunno yet though.