This is something I added to Rochelle, based on some work Silicon Slick had done for V2_Factory.
It is possible to make maps play differently based on the gametype. Generally, Stopwatch maps are faster and more attacker biased, where Campaign maps can be longer and more evenly balanced. In the case of Rochelle, I wanted the stopwatch version to run only 15 minutes and eliminate the Phase 1 objective run. The following sections of script check to see what gametype is being played and makes the appropriate changes:
In game_manager/spawn
game_manager
{
spawn
{
trigger game_manager sw_check
trigger game_manager cpgn_check
}
trigger sw_check //triggers if gametype is stopwatch
{
cvar g_gametype abort_if_not_equal 3
trigger access_codes captured
wm_set_round_timelimit 15
}
trigger cpgn_check //triggers if gametype is not stopwatch
{
cvar g_gametype abort_if_equal 3
alertentity access_codes
}
}
So, what does thsi do? When the map starts, it executes sw_check and cmpn_check. If the gametype is NOT 3 (e.g., stopwatch), ‘SW_check’ aborts, otherwise it makes the code module already captured and sets the timelimit to 15 minutes.
If the gametype is anything but 3, 'cpgn_check alertentities the CTF_Team_Redflag entity (access_codes), so that the attackers can grab it. For some reason, if you don’t alertentity the redflag, it won’t show up at all in Campaign. However, if you do alertentity while in Stopwatch the redflag model will show up but cannot be grabbed. This is why the alertentity is only executed in ‘cmgn_check’
Anyways, hope this helps someone else.