ORIGINAL CP SCRIPT
Code: Select all
// tutorial script for objective game
game_manager
{
spawn
{
// Set scenario information
wm_mapdescription "Checkpoint: Secure the town of El Drab."
// time until reinforcements in seconds
wm_axis_respawntime 1
wm_allied_respawntime 1
wm_number_of_objectives 5
// Set time until round ends in minutes
wm_set_round_timelimit 15
// Set objective #1 properties
// Nazi's control objective #1 at the start
wm_set_objective_status 1 -1
wm_objective_axis_desc 1 "Capture the Sheriff's Office."
wm_objective_allied_desc 1 "Capture the Sheriff's Office."
wm_set_objective_status 2 -1
wm_objective_axis_desc 2 "Capture the Saloon."
wm_objective_allied_desc 2 "Capture the Saloon."
wm_set_objective_status 3 -1
wm_objective_axis_desc 3 "Capture the Stables."
wm_objective_allied_desc 3 "Capture the Stables."
wm_set_objective_status 4 -1
wm_objective_axis_desc 4 "Capture the El Drab Stage Coach."
wm_objective_allied_desc 4 "Capture the El Drab Stage Coach."
wm_set_objective_status 5 -1
wm_objective_axis_desc 5 "Capture the underground stream."
wm_objective_allied_desc 5 "Capture the underground stream."
//wm_overview_image "video/none.roq"
wm_overview_image "gfx/2d/mp_objectives/wildwest_over.tga"
wm_objective_image 1 "gfx/2d/mp_objectives/wildwest_obj1.tga"
wm_objective_image 2 "gfx/2d/mp_objectives/wildwest_obj2.tga"
wm_objective_image 3 "gfx/2d/mp_objectives/wildwest_obj3.tga"
wm_objective_image 4 "gfx/2d/mp_objectives/wildwest_obj4.tga"
wm_objective_image 5 "gfx/2d/mp_objectives/wildwest_obj5.tga"
// SHORT DESCRIPTIONS
wm_objective_short_axis_desc 1 "Sheriff's Office"
wm_objective_short_axis_desc 2 "Saloon"
wm_objective_short_axis_desc 3 "Stables"
wm_objective_short_axis_desc 4 "Stage Coach"
wm_objective_short_axis_desc 5 "Underground Stream"
wm_objective_short_allied_desc 1 "Sheriff's Office"
wm_objective_short_allied_desc 2 "Saloon"
wm_objective_short_allied_desc 3 "Stables"
wm_objective_short_allied_desc 4 "Stage Coach"
wm_objective_short_allied_desc 5 "Underground stream"
// If the round timer expires, nobody wins
// Set the round winner: 0 == AXIS, 1 == ALLIED, -1 == Noone
wm_setwinner -1
// Accum 1-6 will be the state of the checkpoints, -1 means nobody controls the flag
accum 1 set -1
accum 2 set -1
accum 3 set -1
accum 4 set -1
accum 5 set -1
// Accum 7 tracks the tide of battle
accum 7 set 0
}
// The following functions are called from the checkpoints when either team takes control of it
trigger cp1_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #1
wm_set_objective_status 1 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp1_blue
// Change the variable within the script so that we can check if someone wins the round
accum 1 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the Sherrif's Office!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp1_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #1
wm_set_objective_status 1 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp1_red
// Change the variable within the script so that we can check if someone wins the round
accum 1 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the Sherrif's Office!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp2_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #1
wm_set_objective_status 2 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp2_blue
// Change the variable within the script so that we can check if someone wins the round
accum 2 set 1
// Some kind of UI pop-up to alert players
wm_announce "cowboys take the Saloon!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp2_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #2
wm_set_objective_status 2 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp2_red
// Change the variable within the script so that we can check if someone wins the round
accum 2 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits takes the Saloon!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp3_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #3
wm_set_objective_status 3 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp3_blue
// Change the variable within the script so that we can check if someone wins the round
accum 3 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the stables!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp3_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #3
wm_set_objective_status 3 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp3_red
// Change the variable within the script so that we can check if someone wins the round
accum 3 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the stables!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp4_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #4
wm_set_objective_status 4 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp4_blue
// Change the variable within the script so that we can check if someone wins the round
accum 4 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the stage coach!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp4_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #4
wm_set_objective_status 4 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp4_red
// Change the variable within the script so that we can check if someone wins the round
accum 4 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the stage coach!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp5_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #5
wm_set_objective_status 5 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp5_blue
// Change the variable within the script so that we can check if someone wins the round
accum 5 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the underground stream!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp5_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #5
wm_set_objective_status 5 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp5_red
// Change the variable within the script so that we can check if someone wins the round
accum 5 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the underground stream!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
// Check for game-winning condition
trigger checkgame_blue
{
// Check all for checkpoints and see if they have been set to '1' - allied
accum 1 abort_if_not_equal 1
accum 2 abort_if_not_equal 1
accum 3 abort_if_not_equal 1
accum 4 abort_if_not_equal 1
accum 5 abort_if_not_equal 1
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 1
// End the round
wm_endround
}
trigger checkgame_red
{
// Check all for checkpoints and see if they have been set to '0' - axis
accum 1 abort_if_not_equal 0
accum 2 abort_if_not_equal 0
accum 3 abort_if_not_equal 0
accum 4 abort_if_not_equal 0
accum 5 abort_if_not_equal 0
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 0
// End the round
wm_endround
}
// Keep winner set to team with most flags
trigger checkwinner
{
wm_setwinner -1
accum 7 abort_if_equal 0
wm_setwinner 1
accum 7 abort_if_greater_than 0
wm_setwinner 0
}
trigger adjustwinner_cp1_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 1 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp1_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 1 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp2_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 2 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp2_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 2 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp3_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 3 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp3_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 3 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp4_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 4 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp4_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 4 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp5_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 5 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp5_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 5 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
}
checkpoint01
{
trigger axis_capture
{
trigger game_manager cp1_red
}
trigger allied_capture
{
trigger game_manager cp1_blue
}
}
checkpoint02
{
trigger axis_capture
{
trigger game_manager cp2_red
}
trigger allied_capture
{
trigger game_manager cp2_blue
}
}
checkpoint03
{
trigger axis_capture
{
trigger game_manager cp3_red
}
trigger allied_capture
{
trigger game_manager cp3_blue
}
}
checkpoint04
{
trigger axis_capture
{
trigger game_manager cp4_red
}
trigger allied_capture
{
trigger game_manager cp4_blue
}
}
checkpoint05
{
trigger axis_capture
{
trigger game_manager cp5_red
}
trigger allied_capture
{
trigger game_manager cp5_blue
}
}
///Moving scripted stuff goes hewre...............................
vulture
{
spawn
{
trigger vulture start
}
trigger start
{
faceangles 0 90 0 7500
faceangles 0 180 0 7500
faceangles 0 270 0 7500
faceangles 0 360 0 7500
trigger vulture start
}
}
eagle
{
spawn
{
trigger eagle start
}
trigger start
{
faceangles 0 90 0 7000
faceangles 0 180 0 7000
faceangles 0 270 0 7000
faceangles 0 360 0 7000
trigger eagle start
}
}
eagle2
{
spawn
{
trigger eagle2 start
}
trigger start
{
faceangles 0 90 0 6500
faceangles 0 180 0 6500
faceangles 0 270 0 6500
faceangles 0 360 0 6500
trigger eagle2 start
}
}
Code: Select all
// tutorial script for objective game
// last modified by: WeblionX
// first modified by: duke'ku
game_manager
{
spawn
{
// Set scenario information
wm_mapdescription "Checkpoint: Secure the town of El Drab."
// time until reinforcements in seconds
wm_axis_respawntime 1
wm_allied_respawntime 1
wm_number_of_objectives 2
// Set time until round ends in minutes
wm_set_round_timelimit 15
// Set objective #1 properties
// Nazi's control objective #1 at the start
wm_set_objective_status 1 1
wm_objective_axis_desc 1 "Allied Flag."
wm_objective_allied_desc 1 "Allied Flag."
wm_set_objective_status 2 -1
wm_objective_axis_desc 2 "Axis Flag."
wm_objective_allied_desc 2 "Axis Flag."
//wm_overview_image "video/none.roq"
wm_overview_image "gfx/2d/mp_objectives/wildwest_over.tga"
wm_objective_image 1 "gfx/2d/mp_objectives/wildwest_obj1.tga"
wm_objective_image 2 "gfx/2d/mp_objectives/wildwest_obj2.tga"
wm_objective_image 3 "gfx/2d/mp_objectives/wildwest_obj3.tga"
wm_objective_image 4 "gfx/2d/mp_objectives/wildwest_obj4.tga"
wm_objective_image 5 "gfx/2d/mp_objectives/wildwest_obj5.tga"
// SHORT DESCRIPTIONS
wm_objective_short_axis_desc 1 "Sheriff's Office"
wm_objective_short_axis_desc 2 "Saloon"
wm_objective_short_allied_desc 1 "Sheriff's Office"
wm_objective_short_allied_desc 2 "Saloon"
// If the round timer expires, nobody wins
// Set the round winner: 0 == AXIS, 1 == ALLIED, -1 == Noone
wm_setwinner -1
// Accum 1-6 will be the state of the checkpoints, -1 means nobody controls the flag
// accum 1 set -1
// accum 2 set -1
// accum 3 set -1
// accum 4 set -1
// accum 5 set -1
// Accum 7 tracks the tide of battle
// accum 7 set 0
}
// The following functions are called from the checkpoints when either team takes control of it
trigger cp1_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #1
wm_set_objective_status 1 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp1_blue
// Change the variable within the script so that we can check if someone wins the round
accum 1 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the Sherrif's Office!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp1_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #1
wm_set_objective_status 1 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp1_red
// Change the variable within the script so that we can check if someone wins the round
accum 1 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the Sherrif's Office!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp2_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #1
wm_set_objective_status 2 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp2_blue
// Change the variable within the script so that we can check if someone wins the round
accum 2 set 1
// Some kind of UI pop-up to alert players
wm_announce "cowboys take the Saloon!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp2_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #2
wm_set_objective_status 2 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp2_red
// Change the variable within the script so that we can check if someone wins the round
accum 2 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits takes the Saloon!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp3_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #3
wm_set_objective_status 3 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp3_blue
// Change the variable within the script so that we can check if someone wins the round
accum 3 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the stables!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp3_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #3
wm_set_objective_status 3 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp3_red
// Change the variable within the script so that we can check if someone wins the round
accum 3 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the stables!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp4_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #4
wm_set_objective_status 4 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp4_blue
// Change the variable within the script so that we can check if someone wins the round
accum 4 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the stage coach!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp4_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #4
wm_set_objective_status 4 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp4_red
// Change the variable within the script so that we can check if someone wins the round
accum 4 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the stage coach!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
trigger cp5_blue
{
// Change the objective state internally, so UI can update, etc.
// Allied takes control of checkpoint #5
wm_set_objective_status 5 1
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp5_blue
// Change the variable within the script so that we can check if someone wins the round
accum 5 set 1
// Some kind of UI pop-up to alert players
wm_announce "Cowboys take the underground stream!"
// Call function to check if the round has been won
trigger game_manager checkgame_blue
}
trigger cp5_red
{
// Change the objective state internally, so UI can update, etc.
// Axis takes control of checkpoint #5
wm_set_objective_status 5 0
// First update winner based on number of flags held by both teams
trigger game_manager adjustwinner_cp5_red
// Change the variable within the script so that we can check if someone wins the round
accum 5 set 0
// Some kind of UI pop-up to alert players
wm_announce "Bandits take the underground stream!"
// Call function to check if the round has been won
trigger game_manager checkgame_red
}
// Check for game-winning condition
trigger checkgame_blue
{
// Check all for checkpoints and see if they have been set to '1' - allied
accum 1 abort_if_not_equal 1
accum 2 abort_if_not_equal 1
accum 3 abort_if_not_equal 1
accum 4 abort_if_not_equal 1
accum 5 abort_if_not_equal 1
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 1
// End the round
wm_endround
}
trigger checkgame_red
{
// Check all for checkpoints and see if they have been set to '0' - axis
accum 1 abort_if_not_equal 0
accum 2 abort_if_not_equal 0
accum 3 abort_if_not_equal 0
accum 4 abort_if_not_equal 0
accum 5 abort_if_not_equal 0
// Set the round winner: 0 == AXIS, 1 == ALLIED
wm_setwinner 0
// End the round
wm_endround
}
// Keep winner set to team with most flags
trigger checkwinner
{
wm_setwinner -1
accum 7 abort_if_equal 0
wm_setwinner 1
accum 7 abort_if_greater_than 0
wm_setwinner 0
}
trigger adjustwinner_cp1_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 1 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp1_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 1 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp2_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 2 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp2_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 2 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp3_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 3 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp3_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 3 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp4_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 4 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp4_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 4 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
trigger adjustwinner_cp5_blue
{
accum 7 inc 1
trigger game_manager checkwinner
accum 5 abort_if_not_equal 0
accum 7 inc 1
trigger game_manager checkwinner
}
trigger adjustwinner_cp5_red
{
accum 7 inc -1
trigger game_manager checkwinner
accum 5 abort_if_not_equal 1
accum 7 inc -1
trigger game_manager checkwinner
}
}
checkpoint01
{
trigger axis_capture
{
trigger game_manager cp1_red
}
trigger allied_capture
{
trigger game_manager cp1_blue
}
}
checkpoint02
{
spawn
{
remove
}
trigger axis_capture
{
trigger game_manager cp2_red
}
trigger allied_capture
{
trigger game_manager cp2_blue
}
}
checkpoint03
{
spawn
{
remove
}
trigger axis_capture
{
trigger game_manager cp3_red
}
trigger allied_capture
{
trigger game_manager cp3_blue
}
}
checkpoint04
{
spawn
{
remove
}
trigger axis_capture
{
trigger game_manager cp4_red
}
trigger allied_capture
{
trigger game_manager cp4_blue
}
}
checkpoint05
{
trigger axis_capture
{
trigger game_manager cp5_red
}
trigger allied_capture
{
trigger game_manager cp5_blue
}
}
///Moving scripted stuff goes hewre...............................
vulture
{
spawn
{
trigger vulture start
}
trigger start
{
faceangles 0 90 0 7500
faceangles 0 180 0 7500
faceangles 0 270 0 7500
faceangles 0 360 0 7500
trigger vulture start
}
}
eagle
{
spawn
{
trigger eagle start
}
trigger start
{
faceangles 0 90 0 7000
faceangles 0 180 0 7000
faceangles 0 270 0 7000
faceangles 0 360 0 7000
trigger eagle start
}
}
eagle2
{
spawn
{
trigger eagle2 start
}
trigger start
{
faceangles 0 90 0 6500
faceangles 0 180 0 6500
faceangles 0 270 0 6500
faceangles 0 360 0 6500
trigger eagle2 start
}
}