game_manager
{
spawn
{
wm_set_round_timelimit 20
wm_axis_respawntime 4
wm_allied_respawntime 4
wm_number_of_objectives 5
wm_setwinner 1
wait 500
globalaccum 1 set 0
globalaccum 2 set 0
} // End spawn
trigger kolla1 // Axis win?
{
globalaccum 2 abort_is_equal 4
globalaccum 2 abort_if_equal 5
globalaccum 1 abort_if_equal 0
globalaccum 1 abort_if_equal 1
globalaccum 1 abort_if_equal 2
wm_setwinner 0 // 0 = axis
wm_endround
}
trigger kolla2 // Allies win?
{
globalaccum 1 abort_if_equal 4
globalaccum 1 abort_if_equal 5
globalaccum 2 abort_if_equal 0
globalaccum 2 abort_if_equal 1
globalaccum 2 abort_if_equal 2
wm_setwinner 1 // 1 = allies
wm_endround
}
trigger timelimit_hit // This script is run, when the game-clock reaches 0.00 and the match-time is over.
{
wm_setwinner -1
trigger game_manager kolla1
trigger game_manager kolla2
wait 2000 // These wait-values may have to change, to fit your map. If your script doesn't work: Try changing some of the
wait-values.
wm_setwinner -1 // This makes it a draw game, and it will end as a draw game UNLESS kolla1 or kolla2 makes it an axis or
allied victory.
wait 500
}
} // End game_manager bracket.---------------------
flag1
{
spawn
{
}
trigger axis_capture // Flag has been claimed by an axis player
{
wm_teamvoiceannounce 0 "axis_hq_objective_captured"
wm_teamvoiceannounce 1 "allies_hq_objective_lost"
globalaccum 1 inc 1
globalaccum 2 dec 1
wm_announce "^1The Axis have claimed the flag!"
}
trigger allied_capture // Flag has been claimed by an allied player
{
wm_teamvoiceannounce 0 "axis_hq_objective_lost"
wm_teamvoiceannounce 1 "allies_hq_objective_captured"
globalaccum 2 inc 1
globalaccum 1 dec 1
wm_announce "^1The Allies have claimed the flag!"
}
}
flag2
{
spawn
{
}
trigger axis_capture // Flag has been claimed by an axis player
{
wm_teamvoiceannounce 0 "axis_hq_objective_captured"
wm_teamvoiceannounce 1 "allies_hq_objective_lost"
globalaccum 1 inc 1
globalaccum 2 dec 1
wm_announce "^1The Axis have claimed the flag!"
}
trigger allied_capture // Flag has been claimed by an allied player
{
wm_teamvoiceannounce 0 "axis_hq_objective_lost"
wm_teamvoiceannounce 1 "allies_hq_objective_captured"
globalaccum 2 inc 1
globalaccum 1 dec 1
wm_announce "^1The Allies have claimed the flag!"
}
}
flag3
{
spawn
{
}
trigger axis_capture // Flag has been claimed by an axis player
{
wm_teamvoiceannounce 0 "axis_hq_objective_captured"
wm_teamvoiceannounce 1 "allies_hq_objective_lost"
globalaccum 1 inc 1
globalaccum 2 dec 1
wm_announce "^1The Axis have claimed the flag!"
}
trigger allied_capture // Flag has been claimed by an allied player
{
wm_teamvoiceannounce 0 "axis_hq_objective_lost"
wm_teamvoiceannounce 1 "allies_hq_objective_captured"
globalaccum 2 inc 1
globalaccum 1 dec 1
wm_announce "^1The Allies have claimed the flag!"
}
}
flag4
{
spawn
{
}
trigger axis_capture // Flag has been claimed by an axis player
{
wm_teamvoiceannounce 0 "axis_hq_objective_captured"
wm_teamvoiceannounce 1 "allies_hq_objective_lost"
globalaccum 1 inc 1
globalaccum 2 dec 1
wm_announce "^1The Axis have claimed the flag!"
}
trigger allied_capture // Flag has been claimed by an allied player
{
wm_teamvoiceannounce 0 "axis_hq_objective_lost"
wm_teamvoiceannounce 1 "allies_hq_objective_captured"
globalaccum 2 inc 1
globalaccum 1 dec 1
wm_announce "^1The Allies have claimed the flag!"
}
}
flag5
{
spawn
{
}
trigger axis_capture // Flag has been claimed by an axis player
{
wm_teamvoiceannounce 0 "axis_hq_objective_captured"
wm_teamvoiceannounce 1 "allies_hq_objective_lost"
globalaccum 1 inc 1
globalaccum 2 dec 1
wm_announce "^1The Axis have claimed the flag!"
}
trigger allied_capture // Flag has been claimed by an allied player
{
wm_teamvoiceannounce 0 "axis_hq_objective_lost"
wm_teamvoiceannounce 1 "allies_hq_objective_captured"
globalaccum 2 inc 1
globalaccum 1 dec 1
wm_announce "^1The Allies have claimed the flag!"
}
}
//End Flag Segment//
//Begin Wall Segment//
wall1 // in map it belongs to ALLIES
{
spawn // spawn section in here it sets the entities values and
calls needed scripting
{
wait 400 // waits for 4/10's of a second before the game creates this
entity
trigger wall1 setup // causes the setup subroutine of this script....basically
calling a normal spawn section but this is just being fancy
constructible_class 3 // 1 = breakable / 2 = satchel+dyn. / 3 = Dynamite
}
trigger setup // the fancy part...normally people put this sections innerds
into the spawn section of the scripting event
{
setstate defense3_materials default // makes the crates appear
setstate defense3_materials_clip default // makes the crates clip brushes block objects from passing
through the crates
setstate defense3_flag default // makes the flag show
setstate defense3_teeth invisible // I made the clip of the constructible object paired with
the objects look (not a big deal just saves the time of scripting extra objects)
}
buildstart final // This is the section where things start to change
{
setstate defense3_materials default // crates still there
setstate defense3_materials_clip default // crates clip brushes still there
setstate defense3_flag default // flag still there
setstate defense3_teeth underconstruction // constructible object turns glowing white, shows what
you're making
}
built final // Where things come and go
{
setstate defense3_materials invisible // crates go invisible
setstate defense3_materials_clip invisible // crate clipbrushes no longer block
setstate defense3_flag invisible // flag goes bye bye
setstate defense3_teeth default // constructible shows up
}
decayed final // after time passes it resets the objective
{
trigger self setup // Easier way of calling things--time passes and materials
stay visable
// clip brushes still block
// flag is visable still
// constructible stays invisible
}
death // This section is easily explained by saying it is the same
as SETUP but needs to be called "death"
{
trigger self setup // resets the entity back to it's original appearance
}
}
wall2 // in map it belongs to ALLIES
{
spawn // spawn section in here it sets the entities values and
calls needed scripting
{
wait 400 // waits for 4/10's of a second before the game creates this
entity
trigger wall2 setup // causes the setup subroutine of this script....basically
calling a normal spawn section but this is just being fancy
constructible_class 3 // 1 = breakable / 2 = satchel+dyn. / 3 = Dynamite
}
trigger setup // the fancy part...normally people put this sections innerds
into the spawn section of the scripting event
{
setstate defense2_materials default // makes the crates appear
setstate defense2_materials_clip default // makes the crates clip brushes block objects from passing
through the crates
setstate defense2_flag default // makes the flag show
setstate defense2_teeth invisible // I made the clip of the constructible object paired with
the objects look (not a big deal just saves the time of scripting extra objects)
}
buildstart final // This is the section where things start to change
{
setstate defense2_materials default // crates still there
setstate defense2_materials_clip default // crates clip brushes still there
setstate defense2_flag default // flag still there
setstate defense2_teeth underconstruction // constructible object turns glowing white, shows what
you're making
}
built final // Where things come and go
{
setstate defense2_materials invisible // crates go invisible
setstate defense2_materials_clip invisible // crate clipbrushes no longer block
setstate defense2_flag invisible // flag goes bye bye
setstate defense2_teeth default // constructible shows up
}
decayed final // after time passes it resets the objective
{
trigger self setup // Easier way of calling things--time passes and materials
stay visable
// clip brushes still block
// flag is visable still
// constructible stays invisible
}
death // This section is easily explained by saying it is the same
as SETUP but needs to be called "death"
{
trigger self setup // resets the entity back to it's original appearance
}
}
wall3 // in map it belongs to ALLIES
{
spawn // spawn section in here it sets the entities values and
calls needed scripting
{
wait 400 // waits for 4/10's of a second before the game creates this
entity
trigger wall3 setup // causes the setup subroutine of this script....basically
calling a normal spawn section but this is just being fancy
constructible_class 3 // 1 = breakable / 2 = satchel+dyn. / 3 = Dynamite
}
trigger setup // the fancy part...normally people put this sections innerds
into the spawn section of the scripting event
{
setstate defense1_materials default // makes the crates appear
setstate defense1_materials_clip default // makes the crates clip brushes block objects from passing
through the crates
setstate defense1_flag default // makes the flag show
setstate defense1_teeth invisible // I made the clip of the constructible object paired with
the objects look (not a big deal just saves the time of scripting extra objects)
}
buildstart final // This is the section where things start to change
{
setstate defense1_materials default // crates still there
setstate defense1_materials_clip default // crates clip brushes still there
setstate defense1_flag default // flag still there
setstate defense1_teeth underconstruction // constructible object turns glowing white, shows what
you're making
}
built final // Where things come and go
{
setstate defense1_materials invisible // crates go invisible
setstate defense1_materials_clip invisible // crate clipbrushes no longer block
setstate defense1_flag invisible // flag goes bye bye
setstate defense1_teeth default // constructible shows up
}
decayed final // after time passes it resets the objective
{
trigger self setup // Easier way of calling things--time passes and materials
stay visable
// clip brushes still block
// flag is visable still
// constructible stays invisible
}
death // This section is easily explained by saying it is the same
as SETUP but needs to be called "death"
{
trigger self setup // resets the entity back to it's original appearance
}
}