RtCW SP end / change map trigger
The End ^
What we're talking about here is the 'walkable' "Exit" trigger
at the end of a level (this is shown by an 'exit' sign (text) middle
bottom of the screen in game with a 'health bar' below that), the one
you're able to walk into for a couple of paces whilst the "Exit"
message appears and before the next level loads - normally this is a
'fixed' trigger, like any other, that loads the new level / map as soon
as it's activated.
The "Exit" trigger is another one of those undocumented 'commands'
that's hardwired into the game program itself so the properties and
setup isn't documented as with other entities.
To get this to work properly you need 2 trigger fields, one directly
behind the other.
The first is a func_inv_user with key/value pair of;
cursorhint / hint_exit
Targeted at the second one behind it (don't know if you need to do
this atm). This trigger field sets the 'thickness' or the 'distance'
into which a player can walk before hitting the 2nd trigger directly
behind so you can make it a lot thicker...
The second is a 'normal' trigger field; trigger_once, trigger_multiple
or ai_trigger. This is the actual trigger that makes the call to change
the map. Keep in mind it'll need a key/value of;
wait / [time value]
Otherwise it'll trigger once only and the player won't be able to get
out of the map - in the case of missing an objective and going back
for it on returning to exit the trigger will have been fired previously.
This second trigger also needs to be the one that points to your 'changelevel'
call in the script file
player
{
spawn
{
}
trigger endmap
{
changelevel mapname persistant
}
}
Note the word 'endmap', this is very important as that's the
'hardwired' command which makes the exit trigger behave correctly -
without it you don't see the exit 'health' indicator and the trigger
itself won't work properly - you need to have 'endmap' as your script_trigger;
once you've targeted the in game trigger field at this you'll find you
have a nice blue health bar on walking into the exit trigger... (it
goes red if an objective is still left incomplete).... wooohoooo...
sorted..!!