To link a spawn point to the building of a command post (or any objective really) requires 2 steps.
First, make sure the spawn point Team_WOLF_objective is ‘setstate xxx invisible’ after spawning.
Second, complete the objective and launch script command to show the spawn point. For a command post, this would be in the ‘built final’ section of the script.
Here’s an example from my map… (most of the routines are to turn off/on scriptmovers - such as the cp models and clips) The important part is the ‘built final’ section in ‘allied_cp_build’
depot_allied_spawnTWO
{
spawn
{
wait 50
setstate depot_allied_spawnTWO invisible
}
}
//******************************************************//
// Command Post
//
// last mod: Mean Mr. Mustard - 01/16/2004
//******************************************************//
allied_cp_build
{
spawn
{
wait 400
constructible_class 2
accum 0 set 0
}
trigger setup
{
setstate allied_cp_build invisible
setstate allied_cp_toi invisible
setstate allied_cp_clipmain invisible
setstate allied_cp_damagedclip invisible
setchargetimefactor 1 soldier 1
setchargetimefactor 1 lieutenant 1
setchargetimefactor 1 medic 1
setchargetimefactor 1 engineer 1
setchargetimefactor 1 covertops 1
sethqstatus 1 0
}
buildstart final
{
...
}
decayed final
{
...
}
built final
{
trigger allied_cp_builtmodel show
trigger allied_cp_closed hide
trigger allied_cp_damaged hide
trigger allied_cp_builtmodel enable_features
enablespeaker allied_cp_speaker
// switch spawn the first time cp is built
accum 0 abort_if_equal 1
alertentity depot_allied_spawnTWO
alertentity depot_allied_spawnblob
setstate depot_allied_spawnTWO default
setautospawn "Ammo Depot" 1
accum 0 set 1
}
death
{
...
}
}
depot_allied_spawnTWO is the Team_WOLF_objective and my spawn blob is depot_allied_spawnblob. When the cp is built, the two entities are alerted, then the TWO is turned from invisible to default (on) - this makes it show up on the command map. I then set the autospawn to this location (allies can still choose the original spawn point).
I’ve also set an accum so this only happens the first time the cp it built (not after each time the darn covert blows it up…)
You can also turn off the original spawn point if desired - just use the ‘setstate xxx invisible’ on the TWO
EDIT: removed most of the script because it was covered in previous posts…