I have two class 3 objectives, I want it to be open as to which one you destroy first, like oasis, where I borrowed most of the script from. if I destroy obj 1 then 2 it ends the match,if i destroy obj 2 it ends right away, but i want it to be able to go 2-1 as well, as you shouldn’t end the map with one obj destroyed. here’s my script, please help.
game_manager
{
spawn
{
accum 0 set 0 //fort spawn
accum 1 set 0 // State of objective number one
accum 5 set 0 // Corrent number of Pak 75mm guns destroyed
globalaccum 1 set 0
globalaccum 5 set 0
// Game rules
wm_axis_respawntime 30
wm_allied_respawntime 20
wm_number_of_objectives 4
wm_set_round_timelimit 30
// Stopwatch mode defending team (0=Axis, 1=Allies)
wm_set_defending_team 0
// If the round timer expires, the Axis have won, so set the current winning team
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 0
// Set autospawn markers <team (0 = axis, 1 = allies)> <message key of marker>
wait 150
setautospawn "Fort" 1
setautospawn "Fort" 0
}
trigger objective_counter
{
accum 5 inc 1 // Increase game counter
accum 5 abort_if_not_equal 2 // All guns destroyed ?
wait 8000
accum 1 set 1 // Both objectives destroyed
// Call function to check if the round has been won
trigger game_manager checkgame
}
trigger checkgame
{
accum 1 abort_if_not_equal 1
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 1
// End the round
wm_endround
wait 500
}
}
fort_spawn
{
spawn
{
accum 0 set 0 // Who has the flag: 0-Axis, 1-Allied
}
trigger axis_capture // Flag has been touched by an Axis player
{
accum 0 abort_if_equal 0 // do Axis own flag?
accum 0 set 0 // Axis own the pole
wm_announce "Axis reclaim the Fort"
alertentity fort_wobj
setautospawn "Fort" 0
setautospawn "Lake" 1
}
trigger allied_capture // Flag has been touched by an allied player
{
accum 0 abort_if_equal 1 // do Allies own flag?
accum 0 set 1 // Allied own the flag
wm_announce "Allies capture the Fort"
alertentity fort_wobj
alertentity Caves_wobj
setautospawn "Caves" 0
setautospawn "Fort" 1
}
trigger check_obj
{
accum 0 abort_if_equal 1 // Do Allied own the flag?
}
}
// ================================================
// ========== CONSTRUCTIBLE STUFF =================
// ================================================
ladder
{
spawn
{
wait 200
constructible_class 2
constructible_constructxpbonus 10
constructible_destructxpbonus 10
}
death
{
wm_announce “Axis destroyed the ladder”
}
}
// ================================================
// ========== DESTRUCTIBLE STUFF ==================
// ================================================
// Radio Tower
radio
{
spawn
{
wait 200
constructible_class 3
constructible_constructxpbonus 10
constructible_destructxpbonus 10
}
death
{
wm_announce "Allies have destroyed the Radio Tower!"
// Update game manager counter for objectives
trigger game_manager objective_counter
}
}
// Rocket
v2
{
spawn
{
wait 200
constructible_class 3
}
death
{
wm_announce "Allied team has destroyed the Rocket"
trigger game_manager objective_counter
}
}
// ================================================
// ======== END DESTRUCTIBLE STUFF ================
// ================================================
