hello all, this is my first post here. unfortunately, i’m posting because of a bug in my map. in my map, i have a command post that acts as a forward spawn. when the axis control it, they should auto-spawn there, but still be able to select their secondary spawn. for the allies to take control of the forward spawn, they need to destroy the axis cp and build their own, or blow up a wall. if the wall is not blown, the axis should still be able to retake control of the cp and the spawn. however, once the wall is blown, i want the allies to spawn there regardless of who controls the cp. it all sort of works. except that the axis can spawn at the cp regardless of whether the wall is blown and regardless of who controls the cp. they can see both the axis cp spawn flag and the allies cp spawn flag from the limbo menu (though both flags appear as axis flags for the axis team, just that one says allies and one says axis). so, here is the script file i have for the map (much <3 to ifurita for this):
//Map script for [mapname] by Vitriol
//Command post prefab by Seven_DC, CP spawn scripting by Mean Mr. Mustard
//Tweaked by Ifurita
game_manager
{
spawn
{
accum 0 set 0
accum 1 set 0
//spawntimes & round length
wm_axis_respawntime 15
wm_allied_respawntime 10
wm_number_of_objectives 2
wm_set_round_timelimit 20
//objectives
//1 Lunchbox
//2 Fake Wall
//3 Build CP
//current main objectives for both teams (0=axis, 1= allies)
wm_set_main_objective 1 0
wm_set_main_objective 1 1
//objective overview status indicators
//wm_objective_status <objective> <team (0=axis, 1=allies)> <status 0=neutral 1=complete 2=failed)>
wm_objective_status 1 1 0
wm_objective_status 1 0 0
wm_objective_status 2 1 0
wm_objective_status 2 0 0
wm_objective_status 3 1 0
wm_objective_status 3 0 0
//stopwatch mode defending team (0=axis, 1=allies)
wm_set_defending_team 0
//if the round time expires, the axis have won, so set the current winning team
//set round winner (axis=0, allies=1)
wm_setwinner 0
wait 2000
setautospawn "Allied CP" 1 //Uses name from description field of team_WOLF_objective
setautospawn "Axis CP" 0
}
trigger objective_counter
{
accum 1 inc 1
trigger game_manager checkgame
}
trigger checkgame
{
accum 1 abort_if_not_equal 1
wm_setwinner 1
wm_endround
}
}
//End of game_manager section ==========================================================
//Gold
allied_gold
{
spawn
{
wait 200
setstate allied_gold_captured invisible
}
trigger stolen
{
setstate allied_gold_cm_marker invisible
}
trigger returned
{
setstate allied_gold_cm_marker default
}
trigger captured
{
wm_announce "The Allies have secured the gold"
setstate allied_gold_red invisible
setstate allied_gold_captured default
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "axis_obj_secured"
wm_teamvoiceannounce 1 "allied_obj_lost"
// *----------------------------------- vo ------------------------------------------*
wm_objective_status 1 0 1
wm_objective_status 1 1 2
}
}
allied_objectives
{
death
{
trigger game_manager objective_counter
}
}
// False Wall ========================================================================
wall_1
{
spawn
{
wait 200
constructible_class 3
}
death
{
wm_announce "Allies have breached the false wall"
wm_objective_status 1 0 1
wm_objective_status 1 1 2
setautospawn "Axis Spawn" 0
trigger axis_cp_two kill
}
}
//Constructible Barrier by Gold =================================================
dockpad_script
{
spawn
{
wait 200
constructible_class 2
trigger self startup
}
buildstart final
{
}
built final
{
setstate dockpad_target default
setstate dockpad_materials invisible
wm_announce "The gold barrier has been built"
}
decayed final
{
trigger self startup
}
death
{
wm_announce "The Allies have breached the gold barrier"
setstate dockpad_materials default
setstate dockpad_target invisible
}
trigger startup
{
setstate dockpad_target invisible
setstate dockpad_materials default
}
}
// ============================================================================
// NEUTRAL COMMAND POST =======================================================
// FROM Goldrush Thx SD!!! prefab by seven 2003 ===============================
// CP Spawn scripting by Mean Mr. Mustard =====================================
// ============================================================================
allied_compost_built
{
spawn
{
wait 400
trigger allied_compost_built setup
constructible_class 2
}
trigger setup
{
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
{
setstate allied_compost_built_model underconstruction
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
}
built final
{
setstate allied_compost_built_model default
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
trigger allied_compost_built_model enable_allied_features
enablespeaker allied_cp_speaker
setstate allied_cp_two default
alertentity allied_cp_blob
}
decayed final
{
setstate allied_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
}
death
{
setstate allied_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
trigger allied_compost_built_model disable_allied_features
disablespeaker allied_cp_speaker
alertentity allied_cp_blob
setstate allied_cp_two invisible
}
}
allied_compost_built_model
{
spawn
{
wait 400
setstate allied_compost_built_model invisible
}
trigger enable_allied_features
{
setchargetimefactor 1 soldier 0.75
setchargetimefactor 1 lieutenant 0.75
setchargetimefactor 1 medic 0.75
setchargetimefactor 1 engineer 0.75
setchargetimefactor 1 covertops 0.75
sethqstatus 1 1
wm_announce "Allied Command Post constructed. Charge speed increased!"
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"
wm_teamvoiceannounce 1 "allies_hq_compost_constructed"
wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"
// *---------------------------------------------------------------------------------*
wm_objective_status 3 0 2
wm_objective_status 3 1 1
}
trigger disable_allied_features
{
setchargetimefactor 1 soldier 1
setchargetimefactor 1 lieutenant 1
setchargetimefactor 1 medic 1
setchargetimefactor 1 engineer 1
setchargetimefactor 1 covertops 1
sethqstatus 1 0
wm_announce "Axis team has destroyed the Allied Command Post!"
// *----------------------------------- vo ------------------------------------------*
wm_addteamvoiceannounce 0 "axis_hq_compost_construct"
wm_addteamvoiceannounce 1 "allies_hq_compost_construct"
wm_teamvoiceannounce 0 "axis_hq_compost_construct"
wm_teamvoiceannounce 1 "allies_hq_compost_damaged"
// *---------------------------------------------------------------------------------*
wm_objective_status 3 0 0
wm_objective_status 3 1 0
}
}
axis_compost_built
{
spawn
{
wait 400
trigger axis_compost_built setup
constructible_class 2
}
trigger setup
{
setchargetimefactor 0 soldier 1
setchargetimefactor 0 lieutenant 1
setchargetimefactor 0 medic 1
setchargetimefactor 0 engineer 1
setchargetimefactor 0 covertops 1
sethqstatus 0 0
}
buildstart final
{
setstate axis_compost_built_model underconstruction
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
}
built final
{
setstate axis_compost_built_model default
setstate neutral_compost_closed_clip invisible
setstate neutral_compost_closed_model invisible
trigger axis_compost_built_model enable_axis_features
enablespeaker axis_cp_speaker
setstate axis_cp_two default
alertentity axis_cp_blob
}
decayed final
{
setstate axis_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
}
death
{
setstate axis_compost_built_model invisible
setstate neutral_compost_closed_clip default
setstate neutral_compost_closed_model default
trigger axis_compost_built_model disable_axis_features
disablespeaker axis_cp_speaker
setstate axis_cp_two invisible
alertentity axis_cp_blob
}
}
axis_compost_built_model
{
spawn
{
wait 400
setstate axis_compost_built_model invisible
}
trigger enable_axis_features
{
setchargetimefactor 0 soldier 0.75
setchargetimefactor 0 lieutenant 0.75
setchargetimefactor 0 medic 0.75
setchargetimefactor 0 engineer 0.75
setchargetimefactor 0 covertops 0.75
sethqstatus 0 1
wm_announce "Axis Command Post constructed. Charge speed increased!"
// *----------------------------------- vo ------------------------------------------*
wm_teamvoiceannounce 0 "axis_hq_compost_constructed"
wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"
wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"
// *---------------------------------------------------------------------------------*
wm_objective_status 3 0 1
wm_objective_status 3 1 2
}
trigger disable_axis_features
{
setchargetimefactor 0 soldier 1
setchargetimefactor 0 lieutenant 1
setchargetimefactor 0 medic 1
setchargetimefactor 0 engineer 1
setchargetimefactor 0 covertops 1
sethqstatus 0 0
wm_announce "Allied team has destroyed the Axis Command Post!"
// *----------------------------------- vo ------------------------------------------*
wm_addteamvoiceannounce 0 "axis_hq_compost_construct"
wm_addteamvoiceannounce 1 "allies_hq_compost_construct"
wm_teamvoiceannounce 0 "axis_hq_compost_damaged"
wm_teamvoiceannounce 1 "allies_hq_compost_construct"
// *---------------------------------------------------------------------------------*
wm_objective_status 3 0 0
wm_objective_status 3 1 0
}
}
// ============================================================================
// Command Post Spawns ========================================================
// ============================================================================
allied_cp_two
{
spawn
{
wait 100
setstate allied_cp_two invisible
}
}
axis_cp_two
{
spawn
{
wait 100
setstate axis_cp_two default
}
trigger kill
{
trigger axis_cp_two force_allied
alertentity axis_spawn_wobj
remove
}
trigger force_allied
{
accum 0 abort_if_equal 1 // Do Allies already own flag?
wm_objective_status 3 1 1
wm_objective_status 3 0 2
setautospawn "Allied CP" 1
setautospawn "Axis Spawn" 0
alertentity allied_cp_two
}
}
if anyone can give me some help on how to fix the problem, i would much appreciate it.
…I know my things are flawed. I can’t talk about Ifurita’s stuff, but I have seen his work…
