////////budapest map script by Glas$hadow////////////
game_manager
{
	spawn
	{
		////vars
		globalaccum 1 set 0 //bridge states #destroyed
		globalaccum 2 set 2 //elevator 1 team, 0 - axis 1 -allies 2-none
		globalaccum 3 set 2 //elevator 2 team, 0 - axis 1 -allies 2-none
		////enable disable////
		globalaccum 5 set 1 //1=enable 0=disable sewer mine traps
		globalaccum 6 set 1 //1=enable 0=disable axis arty spawnroof on checkpoints
		globalaccum 7 set 0 //1=enable 0=disable 3 dyno main obj
		
		//Game rules
		wm_axis_respawntime	10
		wm_allied_respawntime	10
		wm_set_round_timelimit	30
		wm_number_of_objectives 8
		
		// Objectives=====================================
		// 1: Primary1 : Destroy the Bridge
		// 2: Primary2 : Destroy the East Support
		// 3: Primary3 : Destroy the West Support
		// 4: Secondary1 : Capture Forward Bunker
		// 5: Secondary2 : Bridge Defences
		// 6: Secondary3 : Capture Elevator 1
		// 7: Secondary4 : Capture Elevator 2
		// 8: Secondary5 : Const. Command Post 
		//-----------end limbo camera's 
		// 9:  Secondary6 : East Sewer Gate 
		// 10: Secondary7 : West Sewer Gate 
		// 11: Secondary8 : South Sewer Gate 
		
		wm_set_main_objective		4	0
		wm_set_main_objective		4	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
		wm_objective_status 4 1 2
		wm_objective_status 4 0 1
		wm_objective_status 5 1 0
		wm_objective_status 5 0 0
		wm_objective_status 6 1 0
		wm_objective_status 6 0 0
		wm_objective_status 7 1 0
		wm_objective_status 7 0 0
		wm_objective_status 8 1 0
		wm_objective_status 8 0 0
		////-=============end obj
		
		// Stopwatch mode defending team (0=Axis, 1=Allies)
		wm_set_defending_team	0
		// Winner on expiration of round timer (0=Axis, 1=Allies, -1=Nobody)
		wm_setwinner 0
		
		//set spawn to forward flag//
		///it seems that this wait time is very particular for fixing the autospawn.!1!
		wait 100
		setautospawn	"Forward Bunker"	0
		setautospawn	"Forward Bunker"	1
		wait 1000
	
		// *-------------------------- voice --------------------------------------*
		//axis
		wm_addteamvoiceannounce 0 "bp_axis_construct_defences"
		wm_addteamvoiceannounce 0 "bp_axis_obj_defend"
		wm_teamvoiceannounce 0 "bp_axis_construct_defences"
		wm_teamvoiceannounce 0 "bp_axis_obj_defend"
		//allied	
		wm_addteamvoiceannounce 1 "bp_allied_forward_capture"
		wm_addteamvoiceannounce 1 "bp_allied_obj_attack"
		wm_teamvoiceannounce 1 "bp_allied_forward_capture"
		wm_teamvoiceannounce 1 "bp_allied_obj_attack"
		wm_announce "The Axis have captured the Forward Bunker!"//used in omnibot script.
		// *--------------------------------------------------------------------*		
		trigger axis_arty_roof remove
	}
		
	trigger check_for_win
	{
	globalaccum 7 trigger_if_equal 0 game_manager check_for_2dyno_win
	globalaccum 7 trigger_if_equal 1 game_manager check_for_3dyno_win
	} 
	
	trigger check_for_2dyno_win
	{
		alertentity bridge_rumble //bridge rumble effect comment to disable, see bridge_west death & bridge_east death also for this
		globalaccum 1 abort_if_not_equal 2 
		wm_objective_status 1 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 1 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		disablespeaker speaker_ammo_hut ///disables the irritating sound at map end
		wait 2000 //end round delay part1
		alertentity bridge_main_effect //trigger the smoke and explosion effects
		trigger bridge_main game_end //swap in the damaged state of the bridge
		kill bridge_main //we substitue this for the dyno killing the bridge_main
		alertentity bridge_rumble //bridge rumble effect comment to disable, see bridge_west death & bridge_east death also for this
		wm_setwinner 1 //set allies to winner
		wait 6000 //end round delay part2
		wm_endround //end the map
	}
	
	trigger check_for_3dyno_win
	{
		alertentity bridge_rumble //bridge rumble effect comment to disable, see bridge_west death & bridge_east death also for this
		globalaccum 1 abort_if_less_than 2 ///makes the main trigger usable 
		setstate bridge_main_toi default //main trigger entity
		globalaccum 1 abort_if_not_equal 3 
		wm_objective_status 1 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 1 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		disablespeaker speaker_ammo_hut ///disables the irritating sound at map end
		wm_setwinner 1 //set allies to winner
		wait 8000 //end round delay part2
		wm_endround //end the map
	}
	
} //end game manager

/////////anti arty roofs over axis checkpoints/////////////////

//=======MAIN OBJECTIVE SECTION====================
//----------------Bridge east
bridge_east_target //target added for bots
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}
	death //bot target --should trigger this entitys death 
	{ //is linked to the bridge_east entity and fires it's death
	trigger bridge_east target_used //tell the bridge that the target was used 
	}	
	trigger remove
	{
		remove
	}
}

bridge_east_target_toi //target added for bots
{
	spawn
	{
		wait 300
		// 2=satchel  3=dyna
	}	
	trigger remove
	{
		remove
	}
}

bridge_east
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
		accum 0 set 0 //var for bot target used or not
	}
	trigger target_used
	{
	accum 0 set 1//set value if lower plant site was the one used
	}
	
	death //bot target should trigger this entitys death 
	{
		globalaccum 1 inc 1	
		trigger bridge_east_target_toi remove //remove tois quickly or we may get error if antoher dyno goes off at second toi.
		trigger bridge_east_toi remove
		wm_teamvoiceannounce 0 "bp_axis_wobj_elost"
		wm_teamvoiceannounce 1 "bp_allied_obj_ecomplete"
		wm_objective_status 2 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 2 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		setstate bridge_east_crusher default  //used to simulat rubble pile
		setstate bridge_damaged_east default //damaged bridge section
		trigger bridge_east_normal remove //normal undamaged bridge section
		trigger East_lamp remove	//md3 model
		wait 50
		trigger bridge_east_crusher remove //remove the crushed dont need anymore
		wm_announce "The Allies have destroyed the East Bridge Support!"
		trigger game_manager check_for_win	//check for win
		accum 0 abort_if_not_equal 0
		trigger bridge_east_target remove //remove bot target, only if it was not triggered	
	}
}

bridge_east_crusher
{
	spawn
	{
		wait 300
		setstate bridge_east_crusher invisible
	}
	trigger remove
	{
		remove
	}
}

bridge_east_toi
{
	trigger remove
	{
		remove
	}
}

bridge_damaged_east 
{
	spawn
	{
		wait 300
		setstate bridge_damaged_east invisible
	}
}

East_lamp
{
trigger remove
	{
		remove
	}
}

bridge_east_normal
{
trigger remove
	{
		remove
	}
}
//---------------------West Bridge,, basicly a copy of the east side
bridge_west_target //target added for bots
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}
	death //bot target should trigger this entitys death 
	{
	trigger bridge_west target_used
	}
	trigger remove
	{
		remove
	}	
}

bridge_west_target_toi //target added for bots
{
	spawn
	{
		wait 300
		// 2=satchel  3=dyna
	}	
	trigger remove
	{
		remove
	}
}

bridge_west
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
		accum 0 set 0
	}
	trigger target_used
	{
	accum 0 set 1//set value if lower one used
	}	
	death
	{
		globalaccum 1 inc 1
		trigger bridge_west_target_toi remove
		trigger bridge_west_toi remove
		wm_teamvoiceannounce 0 "bp_axis_wobj_wlost"
		wm_teamvoiceannounce 1 "bp_allied_obj_wcomplete"
		wm_objective_status 3 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 3 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		setstate bridge_west_crusher default //used to simulat rubble pile
		setstate bridge_damaged_west default
		trigger bridge_west_normal remove //normal undamaged bridge section 
		trigger West_lamp remove
		wait 50
		trigger bridge_west_crusher remove
		wm_announce "The Allies have destroyed the West Bridge Support!"
		trigger game_manager check_for_win	
		accum 0 abort_if_not_equal 0
		trigger bridge_west_target remove //remove bot target	
	}
}

bridge_west_crusher
{
	spawn
	{
		wait 300
		setstate bridge_west_crusher invisible
	}
	trigger remove
	{
		remove
	}
}

bridge_west_toi
{
	trigger remove
	{
		remove
	}
}

bridge_damaged_west 
{
	spawn
	{
		wait 300
		setstate bridge_damaged_west invisible
	}
}

West_lamp 
{
       trigger remove
	{
		remove
	}
}

bridge_west_normal
{
       trigger remove
	{
		remove
	}
}
//------------------------Main Bridge---optional dyno plant
bridge_main
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}
	death
	{	
		globalaccum 1 inc 1	
		trigger game_manager check_for_win 	//moved to this function
		trigger self game_end
	}
	trigger game_end
	{
		setstate bridge_damaged_main default
		wm_announce "The Allies blew up the Bridge!"
		wm_teamvoiceannounce 0 "bp_axis_map_end"
		wm_teamvoiceannounce 1 "bp_allied_map_end"
		setstate half_arch invisible
		setstate full_arch invisible
		setstate bridge_damaged_east  invisible
		setstate bridge_damaged_west  invisible
		setstate bridge_main_crusher default
		wait 50
		setstate bridge_main_crusher invisible
		trigger bridge_main_crusher remove
	}
}

half_arch 
{
	spawn
	{
		wait 300
	}
}

full_arch 
{
	spawn
	{
		wait 300
	}
}

bridge_damaged_main 
{
	spawn
	{
		wait 300
		setstate bridge_damaged_main invisible
	}
}

bridge_main_toi
{
	spawn
	{
	wait 300
	setstate bridge_main_toi invisible
	}
}

bridge_main_crusher
{
	spawn
	{
		wait 300
		setstate bridge_main_crusher invisible
	}
	trigger remove
	{
		remove
	}
}
//========Command Post================================
neutral_cp_toi
{
	trigger show_neutral_cabinet			// Show Neutral Closed CP
	{
		setstate neutral_cp_closed default
		setstate neutral_cp_closed_model default
	}
	trigger hide_neutral_cabinet			// Hide Neutral Closed CP
	{
		setstate neutral_cp_closed invisible
		setstate neutral_cp_closed_model invisible
	}
}

// ================================================
allied_cp_open
{
	spawn
	{
		wait 100
		constructible_class 2			// Dyno+Satchel
		trigger self disable_cp_features		// Default charge bar times
		wait 1000
		// *----------------------------------- vo ------------------------------------------*
		wm_teamvoiceannounce 1 "allies_hq_compost_construct"
		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"
		wm_teamvoiceannounce 0 "axis_hq_compost_construct"
		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"
		// *----------------------------------- vo ------------------------------------------*
	}
	trigger disable_cp_features
	{
		setstate allied_cp_open_model invisible	// Hide Open CP model
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0			// Landmines team warning message
		disablespeaker speaker_allied_cp		// Disable morse code sound
	}
	trigger enable_cp_features
	{
		setstate allied_cp_open_model default	// Show open CP model
		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			// Landmines team warning message
		enablespeaker speaker_allied_cp		// Enable morse code sound
	}
	buildstart final
	{
		trigger neutral_cp_toi hide_neutral_cabinet	// Hide Neutral CP model+clip brush
	}
	built final
	{
		trigger self enable_cp_features		// Increase charge bar times
		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"
		// *----------------------------------- vo ------------------------------------------*
		wm_objective_status 8 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 8 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
	}
	decayed final
	{
		setstate allied_cp_open_model invisible	// Hide Open CP model
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
	}
	death
	{
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
		trigger self disable_cp_features		// Default charge bar times
		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"
		// *----------------------------------- vo ------------------------------------------*
		wm_objective_status 8 1 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 8 0 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
	}
}
// ================================================
axis_cp_open
{
	spawn
	{
		wait 100
		constructible_class 2			// Dyno+Satchel
		trigger self disable_cp_features		// Default charge bar times
	}
	trigger disable_cp_features
	{
		setstate axis_cp_open_model invisible	// Hide Open CP model
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0			// Landmines team warning message
		disablespeaker speaker_axis_cp		// Disable morse code sound
	}
	trigger enable_cp_features
	{
		setstate axis_cp_open_model default	// Show open CP model
		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			// Landmines team warning message
		enablespeaker speaker_axis_cp		// Enable morse code sound
	}
	buildstart final
	{
		trigger neutral_cp_toi hide_neutral_cabinet	// Hide Neutral CP model+clip brush
	}
	built final
	{
		trigger self enable_cp_features		// Increase charge bar times
		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"
		// *----------------------------------- vo ------------------------------------------*
		wm_objective_status 8 1 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 8 0 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
	}
	decayed final
	{
		setstate axis_cp_open_model invisible	// Hide Open CP model
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
	}
	death
	{
		trigger neutral_cp_toi show_neutral_cabinet	// Show Neutral CP model+clip brush
		trigger self disable_cp_features		// Default charge bar times
		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"
		// *------------------------- vo ------------------------------------------*
		wm_objective_status 8 1 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 8 0 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
	}
}
//======================Palace capture flag====================
//---capture doors section----
axis_capture_door_01
{
	spawn
	{
	wait 300
	setstate axis_capture_door_01 default
	}
}

allies_capture_door_01
{
	spawn
	{
	wait 300
	setstate allies_capture_door_01 invisible
	}
}

axis_capture_door_02
{
	spawn
	{
	wait 300
	setstate axis_capture_door_02 default
	}
}

allies_capture_door_02
{
	spawn
	{
	wait 300
	setstate allies_capture_door_02 invisible
	}
}

axis_capture_door_03
{
	spawn
	{
	wait 300
	setstate axis_capture_door_03 default
	}
}

allies_capture_door_03
{
	spawn
	{
	wait 300
	setstate allies_capture_door_03 invisible
	}
}

axis_capture_door_04
{
	spawn
	{
	wait 300
	setstate axis_capture_door_04 default
	}
}

allies_capture_door_04
{
	spawn
	{
	wait 300
	setstate allies_capture_door_04 invisible
	}
}

axis_capture_door_05
{
	spawn
	{
	wait 300
	setstate axis_capture_door_05 default
	}
}

allies_capture_door_05
{
	spawn
	{
	wait 300
	setstate allies_capture_door_05 invisible
	}
}
//------flag section-----

forward_flag
{
	spawn
	{
		wait 300
		accum 0 set 0 // Who owns flag: 0-Axis, 1-Allied, 2-Nobody
	}
	
	trigger axis_capture // Touched by an Axis player
	{
		accum 0 abort_if_equal 0 // do Axis own flag?
		accum 0 set 0 // Axis own the flag
		alertentity forward_wobj 
		/////////team capture doors////////////
		setstate axis_capture_door_01 default
		setstate allies_capture_door_01 invisible
		setstate axis_capture_door_02 default
		setstate allies_capture_door_02 invisible
		setstate axis_capture_door_03 default
		setstate allies_capture_door_03 invisible
		setstate axis_capture_door_04 default
		setstate allies_capture_door_04 invisible
		setstate axis_capture_door_05 default
		setstate allies_capture_door_05 invisible	
		///////////anouncements//////////////////
		wm_announce "The Axis have captured the Forward Bunker!"
		wm_objective_status 4 1 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 4 0 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_addteamvoiceannounce 1 "bp_allied_forward_capture"
		wm_removeteamvoiceannounce 0 "bp_axis_forward_capture"
		wm_teamvoiceannounce 1 "bp_allied_forward_lost"
		wm_teamvoiceannounce 0 "bp_axis_forward_captured"	
	}
	
	trigger allied_capture // Touched by an allied player
	{
		accum 0 abort_if_equal 1 // do Allies own flag?
		accum 0 set 1 // Allied own the flag
		alertentity forward_wobj // Switch command map marker
		/////////team capture doors////////////
		setstate axis_capture_door_01 invisible
		setstate allies_capture_door_01 default 
		setstate axis_capture_door_02 invisible
		setstate allies_capture_door_02 default 
		setstate axis_capture_door_03 invisible
		setstate allies_capture_door_03 default 
		setstate axis_capture_door_04 invisible
		setstate allies_capture_door_04 default 
		setstate axis_capture_door_05 invisible
		setstate allies_capture_door_05 default
		///////////anouncements//////////////////
		wm_objective_status 4 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 4 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_announce "The Allies have captured the Forward Bunker!"
		wm_addteamvoiceannounce 0 "bp_axis_forward_capture"
		wm_removeteamvoiceannounce 1 "bp_allied_forward_capture"
		wm_teamvoiceannounce 1 "bp_allied_forward_captured"
		wm_teamvoiceannounce 0 "bp_axis_forward_lost"
	} 
}
//======================Sewer Gates====================
// --------------------West Gate
gate_west ///named for easy grouping in gm file
{
	spawn
	{
		wait 300
		constructible_class 3// 2=satchel  3=dyna
	}
	death
	{
		alertentity gate_west_damaged
		trigger gate_west_toi remove
		trigger gate_west_door remove
		wm_teamvoiceannounce 1 "bp_allied_west_gate"
		wm_teamvoiceannounce 0 "bp_axis_west_gate"
		wm_announce "The Allies have destroyed the West Sewer Gate!"
	}
}
gate_west_door
{
	trigger remove
	{
		remove
	}
}

gate_west_toi
{
	trigger remove
	{
		remove
	}
}
// ----------------------East Gate
gate_east
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}
	death
	{
		alertentity gate_east_damaged
		trigger gate_east_toi remove
		trigger gate_east_door remove
		wm_teamvoiceannounce 1 "bp_allied_east_gate"
		wm_teamvoiceannounce 0 "bp_axis_east_gate"
		wm_announce "The Allies have destroyed the East Sewer Gate!"
	}
}

gate_east_door
{
	trigger remove
	{
		remove
	}
}

gate_east_toi
{
	trigger remove
	{
		remove
	}
}
//--------------------South Gate
gate_south
{
	spawn
	{
		wait 300
		constructible_class 3 // 2=satchel  3=dyna
	}
	death
	{
		alertentity gate_south_damaged
		trigger gate_south_toi remove
		trigger gate_south_door remove
		wm_teamvoiceannounce 1 "bp_allied_south_gate"
		wm_teamvoiceannounce 0 "bp_axis_south_gate"
		wm_announce "The Allies have destroyed the South Sewer Gate!"
	}
}
gate_south_door
{
	trigger remove
	{
		remove
	}
}

gate_south_toi
{
	trigger remove
	{
		remove
	}
}
//=====================Tram Section==========================
//-----------------------------tram 1 right
move_r_tram	
{
	trigger activate	
	{
		trigger tram_r move_dest	
		trigger tram_r move_start	
	}
}

tram_r
{
	spawn
	{
		wait 300
		accum 0 set 1 //set up = point 1 or start point
		accum 1 set 0 //bot and use killer 0 - ok to use 1 in use
		trigger self green_light
	}
	trigger move_dest		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		playsound sound/vehicles/tank/turret_spin.wav looping volume 500
		trigger self red_light
		gotomarker point_02 200 
		trigger tram_rotate rotate_up 
		wait 8000
		stopsound
		trigger self green_light
		accum 0 set 2
		accum 1 set 0
	}
	trigger move_start
	{
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		playsound sound/vehicles/tank/turret_spin.wav looping volume 500
		trigger self red_light
		gotomarker point_01 300
		trigger tram_rotate rotate_down
		wait 6500 
		stopsound
		trigger self green_light
		accum 0 set 1	
		accum 1 set 0
	}
	
	trigger red_light ///switch from green to red light
	{
	remapshader textures/budapest_budapest/bp_tram_1 textures/budapest_budapest/bp_light_tp_m07
	remapshaderflush
	}
	
	trigger green_light ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_tram_1 textures/budapest_budapest/bp_light_tp_m06 
	remapshaderflush
	}	
	
	
}
//------rotation and arm section------------
tram_rotate
{
	spawn
	{
		wait 300
		disablespeaker speaker_tram_rotate
	}
	trigger rotate_up
	{
	enablespeaker speaker_tram_rotate
	faceangles 0 0 -90 2000
	faceangles 0 0 -180 2000 
	faceangles 0 0 -270 2000
	faceangles 0 0 -360 2000
	disablespeaker speaker_tram_rotate
	}
	trigger rotate_down
	{
	enablespeaker speaker_tram_rotate
	faceangles 0 0 90 1625
	faceangles 0 0 180 1625 
	faceangles 0 0 270 1625
	faceangles 0 0 360 1625
	disablespeaker speaker_tram_rotate
	}
}
//--------------------------Tram 2 
move_l_tram
{
	trigger activate		
	{
		trigger tram_l move_dest 
		trigger tram_l move_start	
	}
}

tram_l
{
	spawn
	{
		wait 250
		accum 0 set 2 //set up = point 2 or start point
		accum 1 set 0 //bot and use killer 0 - ok to use 1 in use
		gotomarker point_04 8000
		wait 50
		trigger self green_light
	}
	trigger move_dest		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		playsound sound/vehicles/tank/turret_spin.wav looping volume 500		
		trigger self red_light
		gotomarker point_04 200 
		trigger tram_rotate1 rotate_up
		wait 8000
		stopsound
		trigger self green_light
		accum 0 set 2
		accum 1 set 0
	}
	
	trigger move_start
	{
	// Move back to the starting marker pos 1 aborts if tram is at top
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		playsound sound/vehicles/tank/turret_spin.wav looping volume 500
		trigger self red_light
		gotomarker point_03 300 
		trigger tram_rotate1 rotate_down
		wait 6500
		stopsound
		trigger self green_light
		accum 0 set 1
		accum 1 set 0
	}
	trigger red_light ///switch from green to red light
	{
	remapshader textures/budapest_budapest/bp_tram_2 textures/budapest_budapest/bp_light_tp_m07
	remapshaderflush
	}
	trigger green_light ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_tram_2 textures/budapest_budapest/bp_light_tp_m06 
	remapshaderflush
	}	
}
//------rotation and arm section------------
tram_rotate1
{
	spawn
	{
		wait 300
		disablespeaker speaker_tram_rotate_1
	}
	trigger rotate_up
	{
	enablespeaker speaker_tram_rotate_1
	faceangles 0 0 -90 2000
	faceangles 0 0 -180 2000 
	faceangles 0 0 -270 2000
	faceangles 0 0 -360 2000
	disablespeaker speaker_tram_rotate_1
	}
	trigger rotate_down
	{
	enablespeaker speaker_tram_rotate_1
	faceangles 0 0 90 1625
	faceangles 0 0 180 1625 
	faceangles 0 0 270 1625
	faceangles 0 0 360 1625
	disablespeaker speaker_tram_rotate_1
	}
}
//====================================================================
//=====================Service elevators===============================
//====================================================================
//===elevator 1::: very complicated script.
//===========================mover control section===================
//target_script_trigger entity wait time is apx distance(gameunits)/(speed*0.01)*10 = wait
move_elevator_axis
{
	//both of these get called one fails one passes
	trigger elevator_axis		
	{		
		trigger elevator up_axis
		trigger elevator down_axis
	}
}

move_elevator_allies
{
	//both of these get called one fails one passes
	trigger elevator_allies		
	{	
		trigger elevator up_allies
		trigger elevator down_allies
	}	
}

elevator
{
	spawn
	{
		wait 300
		gotomarker point_05 8000 //bottom
		accum 0 set 0 //elevator position// 0-bottom 1-top
		//globalaccum 2 teamflag 0-axis 1-allies 2-none
	}
	////team comand section///////////////
	trigger up_axis 
	{ //at bottom going up
		globalaccum 2 abort_if_not_equal 0 //is the elevator on and axis
		accum 0 abort_if_not_equal 0 //is the elevator at the bottom
		trigger self elevator_up
	} //now at top
	trigger down_axis
	{ //at top going down
		globalaccum 2 abort_if_not_equal 0 //is the elevator on
		accum 0 abort_if_not_equal 1 //is the elevator at the top
		trigger self elevator_down
	} //now at bottom
	
	trigger up_allies
	{ //at bottom going up
		globalaccum 2 abort_if_not_equal 1 //is the elevator on
		accum 0 abort_if_not_equal 0 //is the elevator at the bottom
		trigger self elevator_up
	} //now at top
	
	trigger down_allies
	{ //at top going down
		globalaccum 2 abort_if_not_equal 1 //is the elevator on
		accum 0 abort_if_not_equal 1 //is the elevator at the top
		trigger self elevator_down
	} //now at bottom
	////elevator movement core section////////
	trigger elevator_up //at top going down
	{
		trigger self disable_users
		trigger self red_light
		wait 500
		playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
		gotomarker point_06 350 
		wait 6000 //5668
		stopsound
		accum 0 set 1	
		//////////teamflag 0-axis 1-allies 2-none///////////
		trigger self green_light
		globalaccum 2 trigger_if_equal 1 elevator enable_users
		globalaccum 2 trigger_if_equal 0 elevator enable_users
		globalaccum 2 abort_if_not_equal 2 //second check after moving for lights and user
		trigger self no_light
	}
	
	trigger elevator_down //at bottom going up
	{
		trigger self disable_users
		trigger self red_light
		wait 500
		playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
		gotomarker point_05 350 
		wait 6000 //5668
		stopsound
		accum 0 set 0
		trigger self green_light
		globalaccum 2 trigger_if_equal 1 elevator enable_users
		globalaccum 2 trigger_if_equal 0 elevator enable_users
		globalaccum 2 abort_if_not_equal 2 //second check after moving for lights and user
		trigger self no_light
		//////////teamflag 0-axis 1-allies 2-none///////////
	}
	///team user section//////////////
	trigger enable_users
	{ //both called on passes one fails
	trigger self enable_axis_user
	trigger self enable_allies_user
	}
	
	trigger disable_users
	{
	trigger self disable_axis_user
	trigger self disable_allies_user
	}
	
	trigger enable_axis_user
	{
	globalaccum 2 abort_if_not_equal 0 //teamflag 0-axis 1-allies 2-none///////////
	setstate axis_elevator_trigger default
	}
	
	trigger enable_allies_user
	{
	globalaccum 2 abort_if_not_equal 1 //teamflag 0-axis 1-allies 2-none///////////
	setstate allied_elevator_trigger default
	}
	
	trigger disable_axis_user
	{
	globalaccum 2 abort_if_not_equal 0 //teamflag 0-axis 1-allies 2-none///////////
	setstate axis_elevator_trigger invisible
	}
	
	trigger disable_allies_user
	{
	globalaccum 2 abort_if_not_equal 1 //teamflag 0-axis 1-allies 2-none///////////
	setstate allied_elevator_trigger invisible
	}
	/////////light section
	trigger red_light ///switch from green to red light
	{
	remapshader textures/budapest_budapest/bp_elevator_1 textures/budapest_budapest/bp_light_tp_m07
	remapshaderflush
	}
	
	trigger green_light ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_elevator_1 textures/budapest_budapest/bp_light_tp_m06 
	remapshaderflush
	}	
	
	trigger no_light
	{
	remapshader textures/budapest_budapest/bp_elevator_1 textures/budapest_budapest/bp_no_light 
	remapshaderflush
	}	
	///team flag section
	trigger axis_logo ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_elevator_1_team textures/budapest_budapest/bp_axis_logo
	remapshaderflush
	}	
	
	trigger allies_logo
	{
	remapshader textures/budapest_budapest/bp_elevator_1_team textures/budapest_budapest/bp_allied_logo  
	remapshaderflush
	}	
	
	trigger no_logo
	{
	remapshader textures/budapest_budapest/bp_elevator_1_team textures/budapest_budapest/bp_no_logo  
	remapshaderflush
	}	
} /////////end elevator 1 section
//=======================Generator & team control section=====================
generator_allied
{
	spawn
	{
		wait 300
		constructible_class	2
		trigger self start
	}
	
	trigger start
	{
		setstate construct_materials default	// Crate Models
		setstate construct_clip default		// Clip brushes
		setstate construct_flag default  //construct flag
		setstate generator_damaged default //damaged state
		setstate allied_elevator_trigger invisible
		globalaccum 2 set 2 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator no_light //turn off lightswitch
		trigger elevator no_logo //turn off team flag
		disablespeaker speaker_elevator_1	
	}
	
	built final
	{
		enablespeaker speaker_elevator_1
		setstate construct_materials invisible	// Crate Models
		setstate construct_clip invisible	// Clip brushes
		setstate construct_flag invisible //constuct flag
		setstate generator_damaged invisible //damaged state
		setstate allied_elevator_trigger default
		globalaccum 2 set 1 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator green_light
		trigger elevator allies_logo
		///announcements\\\\
		wm_teamvoiceannounce 1 "bp_allied_elevator1_repaired"
		wm_teamvoiceannounce 0 "bp_axis_elevator1_trepaired"
		wm_objective_status 6 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_announce "The Allies have repaired the First Elevator Generator!"
	}
	
	decayed final
	{
		trigger self start
	}
	
	death
	{
		wm_objective_status 6 1 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_teamvoiceannounce 1 "bp_allied_elevator1_damaged"
		wm_teamvoiceannounce 0 "bp_axis_elevator1_damaged"
		wm_announce "The First Elevator Generator has been Dammaged!" 
		trigger self start 
	}
}
//axis section-----------------------------------------------
generator_axis
{
	spawn
	{
		wait 300
		constructible_class	2
		trigger self start
	}
	trigger start
	{
		setstate construct_materials default	// Crate Models
		setstate construct_clip default		// Clip brushes
		setstate construct_flag default  //construct flag
		setstate generator_damaged default //damaged state
		setstate axis_elevator_trigger invisible
		globalaccum 2 set 2 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator no_light //turn off lightswitch
		trigger elevator no_logo //turn off team flag
		disablespeaker speaker_elevator_1	
	}
	
	built final
	{
		enablespeaker speaker_elevator_1
		setstate construct_materials invisible	// Crate Models
		setstate construct_clip invisible	// Clip brushes
		setstate construct_flag invisible //constuct flag
		setstate generator_damaged invisible //damaged state
		setstate axis_elevator_trigger default
		globalaccum 2 set 0 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator green_light
		trigger elevator axis_logo
		///announcements\\\\
		wm_teamvoiceannounce 1 "bp_allied_elevator1_trepaired"
		wm_teamvoiceannounce 0 "bp_axis_elevator1_repaired"
		wm_announce "The Axis have repaired the First Elevator Generator!"
		wm_objective_status 6 1 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
	}
	decayed final
	{
		trigger self start
	}
	death
	{
		wm_objective_status 6 1 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_teamvoiceannounce 1 "bp_allied_elevator1_damaged"
		wm_teamvoiceannounce 0 "bp_axis_elevator1_damaged"
		wm_announce "The First Elevator Generator has been Dammaged!"
		trigger self start 
	}
}
//===elevator 2============================================

//===========================mover control section===================
//target_script_trigger entity wait time is apx distance(gameunits)/(speed*0.01)*10 = wait
move_elevator_axis_2
{
	spawn
	{
		wait 300
	}
	//both of these get called one fails one passes
	trigger elevator_axis		
	{		
		trigger elevator_2 up_axis
		trigger elevator_2 down_axis
	}
}

move_elevator_allies_2
{
	spawn
	{
		wait 300
	}
	//both of these get called one fails one passes
	trigger elevator_allies		
	{	
		trigger elevator_2 up_allies
		trigger elevator_2 down_allies
	}	
}

elevator_2
{
	spawn
	{
		wait 300
		gotomarker point_18 8000 //bottom
		accum 0 set 0 //elevator position// 0-bottom 1-top
		//globalaccum 2 teamflag 0-axis 1-allies 2-none
	}
	////team comand section///////////////
	trigger up_axis 
	{ //at bottom going up
		globalaccum 3 abort_if_not_equal 0 //is the elevator on and axis
		accum 0 abort_if_not_equal 0 //is the elevator at the bottom
		trigger self elevator_up
	} //now at top
	trigger down_axis
	{ //at top going down
		globalaccum 3 abort_if_not_equal 0 //is the elevator on
		accum 0 abort_if_not_equal 1 //is the elevator at the top
		trigger self elevator_down
	} //now at bottom
	
	trigger up_allies
	{ //at bottom going up
		globalaccum 3 abort_if_not_equal 1 //is the elevator on
		accum 0 abort_if_not_equal 0 //is the elevator at the bottom
		trigger self elevator_up
	} //now at top
	
	trigger down_allies
	{ //at top going down
		globalaccum 3 abort_if_not_equal 1 //is the elevator on
		accum 0 abort_if_not_equal 1 //is the elevator at the top
		trigger self elevator_down
	} //now at bottom
	////elevator movement core section////////
	trigger elevator_up	//at top going down
	{
		trigger self disable_users
		trigger self red_light
		wait 500
		playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
		gotomarker point_17 350 
		wait 6000 //5668
		stopsound
		accum 0 set 1
		trigger self green_light
		globalaccum 3 trigger_if_equal 1 elevator_2 enable_users
		globalaccum 3 trigger_if_equal 0 elevator_2 enable_users
		globalaccum 3 abort_if_not_equal 2 //second check after moving for lights and user
		trigger self no_light
		//////////teamflag 0-axis 1-allies 2-none///////////
	}
	
	trigger elevator_down	//at bottom going up
	{
		trigger self disable_users
		trigger self red_light
		wait 500
		playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
		gotomarker point_18 350 
		wait 6000 //5668
		stopsound
		accum 0 set 0	
		trigger self green_light
		globalaccum 3 trigger_if_equal 1 elevator_2 enable_users
		globalaccum 3 trigger_if_equal 0 elevator_2 enable_users
		globalaccum 3 abort_if_not_equal 2 //second check after moving for lights and user
		//////////teamflag 0-axis 1-allies 2-none///////////
		trigger self no_light
	}
	///team user section//////////////
	trigger enable_users
	{ //both called on passes one fails
	trigger self enable_axis_user
	trigger self enable_allies_user
	}
	
	trigger disable_users
	{
	trigger self disable_axis_user
	trigger self disable_allies_user
	}
	
	trigger enable_axis_user
	{
	globalaccum 3 abort_if_not_equal 0 //teamflag 0-axis 1-allies 2-none///////////
	setstate axis_elevator_trigger_2 default
	}
	
	trigger enable_allies_user
	{
	globalaccum 3 abort_if_not_equal 1 //teamflag 0-axis 1-allies 2-none///////////
	setstate allied_elevator_trigger_2 default
	}
	
	trigger disable_axis_user
	{
	globalaccum 3 abort_if_not_equal 0 //teamflag 0-axis 1-allies 2-none///////////
	setstate axis_elevator_trigger_2 invisible
	}
	
	trigger disable_allies_user
	{
	globalaccum 3 abort_if_not_equal 1 //teamflag 0-axis 1-allies 2-none///////////
	setstate allied_elevator_trigger_2 invisible
	}
	/////////light section
	trigger red_light ///switch from green to red light
	{
	remapshader textures/budapest_budapest/bp_elevator_2 textures/budapest_budapest/bp_light_tp_m07
	remapshaderflush
	}
	
	trigger green_light ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_elevator_2 textures/budapest_budapest/bp_light_tp_m06 
	remapshaderflush
	}	
	
	trigger no_light
	{
	remapshader textures/budapest_budapest/bp_elevator_2 textures/budapest_budapest/bp_no_light 
	remapshaderflush
	}	
	///team flag section
	trigger axis_logo ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_elevator_2_team textures/budapest_budapest/bp_axis_logo
	remapshaderflush
	}	
	
	trigger allies_logo
	{
	remapshader textures/budapest_budapest/bp_elevator_2_team textures/budapest_budapest/bp_allied_logo  
	remapshaderflush
	}	
	
	trigger no_logo
	{
	remapshader textures/budapest_budapest/bp_elevator_2_team textures/budapest_budapest/bp_no_logo 
	remapshaderflush
	}	
} /////////end elevator 2 section
//=======================Generator & team control section=====================
generator_allied_2
{
	spawn
	{
		wait 300
		constructible_class	2
		trigger self start
	}
	
	trigger start
	{
		setstate construct_materials_2 default	// Crate Models
		setstate construct_clip_2 default		// Clip brushes
		setstate construct_flag_2 default  //construct flag
		setstate generator_damaged_2 default //damaged state
		setstate allied_elevator_trigger_2 invisible
		globalaccum 3 set 2 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator_2 no_light //turn off lightswitch
		trigger elevator_2 no_logo //turn off team flag
		disablespeaker speaker_elevator_2	
	}
	
	built final
	{
		enablespeaker speaker_elevator_2
		setstate construct_materials_2 invisible	// Crate Models
		setstate construct_clip_2 invisible	// Clip brushes
		setstate construct_flag_2 invisible //constuct flag
		setstate generator_damaged_2 invisible //damaged state
		setstate allied_elevator_trigger_2 default
		globalaccum 3 set 1 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator_2 green_light
		trigger elevator_2 allies_logo
		///announcements\\\\
		wm_teamvoiceannounce 1 "bp_allied_elevator2_repaired"
		wm_teamvoiceannounce 0 "bp_axis_elevator2_trepaired"
		wm_objective_status 6 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_announce "The Allies have repaired the Second Elevator Generator!"
	}
	
	decayed final
	{
		trigger self start
	}
	
	death
	{
		wm_objective_status 6 1 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_teamvoiceannounce 1 "bp_allied_elevator2_damaged"
		wm_teamvoiceannounce 0 "bp_axis_elevator2_damaged"
		wm_announce "The Second Elevator Generator has been Dammaged!" 
		trigger self start 
	}
}
//axis section-----------------------------------------------
generator_axis_2
{
	spawn
	{
		wait 300
		constructible_class	2
		trigger self start
	}
	trigger start
	{
		setstate construct_materials_2 default	// Crate Models
		setstate construct_clip_2 default		// Clip brushes
		setstate construct_flag_2 default  //construct flag
		setstate generator_damaged_2 default //damaged state
		setstate axis_elevator_trigger_2 invisible
		globalaccum 3 set 2 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator_2 no_light //turn off lightswitch
		trigger elevator_2 no_logo //turn off team flag
		disablespeaker speaker_elevator_2	
	}
	
	built final
	{
		enablespeaker speaker_elevator_2
		setstate construct_materials_2 invisible	// Crate Models
		setstate construct_clip_2 invisible	// Clip brushes
		setstate construct_flag_2 invisible //constuct flag
		setstate generator_damaged_2 invisible //damaged state
		setstate axis_elevator_trigger_2 default
		globalaccum 3 set 0 //teamflag 0-axis 1-allies 2-none///////////
		trigger elevator_2 green_light
		trigger elevator_2 axis_logo
		///announcements\\\\
		wm_teamvoiceannounce 1 "bp_allied_elevator2_trepaired"
		wm_teamvoiceannounce 0 "bp_axis_elevator2_repaired"
		wm_announce "The Axis have repaired the Second Elevator Generator!"
		wm_objective_status 6 1 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
	}
	decayed final
	{
		trigger self start
	}
	death
	{
		wm_objective_status 6 1 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 6 0 0 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_teamvoiceannounce 1 "bp_allied_elevator2_damaged"
		wm_teamvoiceannounce 0 "bp_axis_elevator2_damaged"
		wm_announce "The Second Elevator Generator has been Dammaged!"
		trigger self start 
	}
}

//----------------attic section--------------
attic_trigger
{
	trigger open		
	{
		trigger attic_door open	
		trigger attic_book open	
	}
}

attic_door
{
	spawn
	{
		wait 300
	}
	trigger open		
	{
		playsound sound/movers/doors/door4_open.wav volume 1000
	 	faceangles 0 90 0 2000
		wait 5000
		playsound sound/movers/doors/door4_close.wav volume 1000
		faceangles 0 0 0 2000
	}
}

attic_book
{
	spawn
	{
		wait 300
	}
	trigger open		
	{
	 	faceangles 0 0 -30 2000
		wait 5000
		faceangles 0 0 0 2000
	}
}
//===========================================================
//========================fish mover=========================
//===========================================================
fish //scriptname of script_mover
{
	spawn
	{
		wait 300
		followspline 0 spl_01 50000 length 32 wait //spawn the fish to her
		trigger self fish_path //goto fish_path
	}
	trigger fish_path
	{
		//here is the commands the mover will follow
		followspline 0 spl_01 300 wait length 304
		//this says goto spl_01 at a speed of 100 and don't look at
		//the next command until after waiting 304
		followspline 0 spl_02 300 wait length 304
		followspline 0 spl_03 300 wait length 304
		followspline 0 spl_04 300 wait length 304
		followspline 0 spl_05 300 wait length 304
		followspline 0 spl_06 300 wait length 304
		followspline 0 spl_07 300 wait length 304
		followspline 0 spl_08 300 wait length 304
		followspline 0 spl_09 300 wait length 304
		followspline 0 spl_10 300 wait length 304
		trigger self fish_path
	}
}
bp_fish
{
	spawn
	{
		wait 300
		attachtotag fish start //fish
	}
}
//===================================================
//============================guardrails==============
//===================================================
guardrail_target 	
{
	trigger guardrail_up		
	{
		trigger guardrail move_up
	}
}

guardrail
{
	spawn
	{ 
		wait 300
		accum 0 set 0 //sound controll 0-on 1-off
	}	
	
	trigger move_up
	{
		trigger self play_sound
		faceangles 0 0 -35 2000
		accum 0 set 1 /// disable sound
		stopsound
		wait 500
		trigger	self move_down
	}
	
	trigger play_sound
	{
	accum 0 abort_if_not_equal 0
	playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
	}
	
	trigger move_down
	{
		accum 0 set 0
		trigger self play_sound
		faceangles 0 0 0 2000
		stopsound
 		wait 500
	}
}
//-------------guardrail 1----------------
guardrail_target_1 	
{
	trigger guardrail_up		
	{
		trigger guardrail_1 move_up
	}
}

guardrail_1
{
	spawn
	{ 
		wait 300
		accum 0 set 0 //sound controll 0-on 1-off
	}	
	
	trigger move_up
	{
		trigger self play_sound
		faceangles 0 0 35 2000
		accum 0 set 1 /// disable sound
		stopsound
		wait 500
		trigger	self move_down
	}
	
	trigger play_sound
	{
	accum 0 abort_if_not_equal 0
	playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
	}
	
	trigger move_down
	{
		accum 0 set 0
		trigger self play_sound
		faceangles 0 0 0 2000
		stopsound
 		wait 500
	}
}
//-------------guardrail 2----------------

guardrail_target_2 	
{
	trigger guardrail_up		
	{
		trigger guardrail_2 move_up
	}
}
guardrail_2
{
	spawn
	{ 
		wait 300
		accum 0 set 0 //sound controll 0-on 1-off
	}	
	
	trigger move_up
	{
		trigger self play_sound
		faceangles 0 0 35 2000
		accum 0 set 1 /// disable sound
		stopsound
		wait 500
		trigger	self move_down
	}
	
	trigger play_sound
	{
	accum 0 abort_if_not_equal 0
	playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
	}
	
	trigger move_down
	{
		accum 0 set 0
		trigger self play_sound
		faceangles 0 0 0 2000
		stopsound
 		wait 500
	}
}
//-------------guardrail 3----------------

guardrail_target_3 	
{
	trigger guardrail_up		
	{
		trigger guardrail_3 move_up
	}
}

guardrail_3
{
	spawn
	{ 
		wait 300
		accum 0 set 0 //sound controll 0-on 1-off
	}	
	
	trigger move_up
	{
		trigger self play_sound
		faceangles 0 0 -35 2000
		accum 0 set 1 /// disable sound
		stopsound
		wait 500
		trigger	self move_down
	}
	
	trigger play_sound
	{
	accum 0 abort_if_not_equal 0
	playsound sound/movers/misc/garage_door_loop_01.wav looping volume 1000
	}
	
	trigger move_down
	{
		accum 0 set 0
		trigger self play_sound
		faceangles 0 0 0 2000
		stopsound
 		wait 500
	}
}
//=========================================================
//==========================garage_doors===================
//=========================================================
g_door_trigger	
//accum values are set to mirror postion 1 = closed 2 = open
{	
trigger activate	
	{ //these four get called 2 pass 2 fail
		trigger g_door_l open_door	
		trigger g_door_r open_door 
		trigger g_door_l close_door	
		trigger g_door_r close_door
	}
}

g_door_l
{
	spawn
	{	
		wait 300
		accum 0 set 2 //set up = point 2 or start point
		accum 1 set 0 //bot and use killer
		trigger self green_light
	}
	trigger close_door		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		trigger self red_light
		gotomarker point_8 50 			
		playsound sound/movers/misc/big_gate2.wav looping volume 1000			
		wait 2000
		stopsound
		playsound sound/movers/misc/big_gate3.wav looping volume 800
		wait 240
		stopsound
		trigger self green_light
		accum 0 set 2
		accum 1 set 0
	}
	trigger open_door
	{
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		trigger self red_light 
		gotomarker point_10 50 			
		playsound sound/movers/misc/big_gate2.wav looping volume 1000			
		wait 2000
		stopsound
		playsound sound/movers/misc/big_gate1.wav looping volume 800
		wait 240
		stopsound
		trigger self green_light
		accum 0 set 1
		accum 1 set 0
	}
	trigger red_light ///switch from green to red light
	{
	remapshader textures/budapest_budapest/bp_garage_1 textures/budapest_budapest/bp_light_tp_m07
	remapshaderflush
	}
	
	trigger green_light ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_garage_1 textures/budapest_budapest/bp_light_tp_m06 
	remapshaderflush
	}	
}

g_door_r
{
	spawn
	{
		wait 300
		accum 0 set 2 //set up = point 2 or start point 
		accum 1 set 0 //bot and use killer
	}
	trigger close_door		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		gotomarker point_8 50 	
		wait 2240
		accum 0 set 2
		accum 1 set 0
	}
	trigger open_door
	{
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		gotomarker point_9 50 	
		wait 2240
		accum 0 set 1
		accum 1 set 0
	}
}
//----------second door	
//accum values are set to mirror postion 1 = closed 2 = open
g_door_trigger1
{	

trigger activate	
	{
		trigger g_door_l1 open_door	
		trigger g_door_r1 open_door 
		trigger g_door_l1 close_door	
		trigger g_door_r1 close_door
	}
}

g_door_l1
{
	spawn
	{	
		wait 300
		accum 0 set 2 //set up = point 2 or start point
		accum 1 set 0 //bot and use killer
		trigger self green_light
	}	
	trigger close_door		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		trigger self red_light
		gotomarker point_11 50 
		playsound sound/movers/misc/big_gate2.wav looping volume 1000			
		wait 2000
		stopsound
		playsound sound/movers/misc/big_gate3.wav looping volume 800
		wait 240
		stopsound
		trigger self green_light
		accum 0 set 2
		accum 1 set 0
	}	
	trigger open_door
	{
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		trigger self red_light
		gotomarker point_12 50 	
		playsound sound/movers/misc/big_gate2.wav looping volume 1000			
		wait 2000
		stopsound
		playsound sound/movers/misc/big_gate1.wav looping volume 800
		wait 240
		stopsound
		trigger self green_light
		setstate g_door_user1 default 
		accum 0 set 1
		accum 1 set 0
	}
	trigger red_light ///switch from green to red light
	{
	remapshader textures/budapest_budapest/bp_garage_2 textures/budapest_budapest/bp_light_tp_m07
	remapshaderflush
	}
	
	trigger green_light ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_garage_2 textures/budapest_budapest/bp_light_tp_m06 
	remapshaderflush
	}	
}

g_door_r1
{
	spawn
	{
	wait 300
	accum 0 set 2 //set up = point 2 or start point
	accum 1 set 0 //bot and use killer	
	}
	trigger close_door		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		gotomarker point_11 50 	
		wait 2240
		accum 0 set 2
		accum 1 set 0
	}
	trigger open_door
	{
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		gotomarker point_13 50 	
		wait 2240
		accum 0 set 1
		accum 1 set 0
	}	
}
//----------third door

g_door_trigger2	//accum values are set to mirror postion 1 = closed 2 = open
{	
	trigger activate	
	{
		trigger g_door_l2 open_door	
		trigger g_door_r2 open_door 
		trigger g_door_l2 close_door	
		trigger g_door_r2 close_door
	}
}

g_door_l2
{
	spawn
	{	
		wait 300
		accum 0 set 2 //set up = point 2 or start point
		accum 1 set 0 //bot and use killer	
		trigger self green_light
	}	
	trigger close_door		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		trigger self red_light
		gotomarker point_14 50 	
		playsound sound/movers/misc/big_gate2.wav looping volume 1000			
		wait 2000
		stopsound
		playsound sound/movers/misc/big_gate3.wav looping volume 800
		wait 240
		stopsound
		trigger self green_light
		accum 0 set 2
		accum 1 set 0
	}
	trigger open_door
	{
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		trigger self red_light
		gotomarker point_15 50 	
		playsound sound/movers/misc/big_gate2.wav looping volume 1000		
		wait 2000
		stopsound
		playsound sound/movers/misc/big_gate1.wav looping volume 800
		wait 240
		stopsound
		trigger self green_light
		accum 0 set 1
		accum 1 set 0
	}
	
	trigger red_light ///switch from green to red light
	{
	remapshader textures/budapest_budapest/bp_garage_3 textures/budapest_budapest/bp_light_tp_m07
	remapshaderflush
	}
	
	trigger green_light ///switch from red to green light
	{
	remapshader textures/budapest_budapest/bp_garage_3 textures/budapest_budapest/bp_light_tp_m06 
	remapshaderflush
	}	
}

g_door_r2
{
	spawn
	{
		wait 300
		accum 0 set 2 //set up = point 2 or start point 
		accum 1 set 0 //bot and use killer	
	}
	trigger close_door		
	{
		accum 0 abort_if_not_equal 1
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		gotomarker point_14 50 	
		wait 2240
		accum 0 set 2
		accum 1 set 0
	}
	trigger open_door
	{
		accum 0 abort_if_not_equal 2
		accum 1 abort_if_not_equal 0
		accum 1 set 1
		gotomarker point_16 50 	
		wait 2240
		accum 0 set 1
		accum 1 set 0
	}
}
//==============secrect car=============
secret_car_trigger	
//accum values are set to mirror postion 1 = river 2 = palace
{	
	trigger activate	
	{
		trigger secret_car river	
		trigger secret_car palace	
	}
}

secret_Car
{
	spawn
	{
		accum 0 set 1 //set up = point 1 or start point/ river
		wait 300
		setstate secret_car_user1 invisible 
	}
	trigger river		
	{
		accum 0 abort_if_not_equal 2
		setstate secret_car_user invisible 
		setstate secret_car_user1 invisible
		trigger upper_door open
		wait 2000
		playsound sound/vehicles/tug/tug_move.wav looping volume 800
 		gotomarker secret_path_5 100 
		wait 3000
		gotomarker secret_path_4 500 	
		trigger upper_door close 
		setstate upper_door_user default
		wait 6000
       	gotomarker secret_path_3 500 	
		wait 560
      	gotomarker secret_path_2 500 	
		wait 8000
		setstate lower_door_user invisible
		wait 2000
		trigger lower_door open	
		wait 2000
		gotomarker secret_path_1 500 
		trigger lower_door close 
		setstate lower_door_user default 
		wait 500
		stopsound
		accum 0 set 1
		setstate secret_car_user default 	
	}
	trigger palace
	{
		accum 0 abort_if_not_equal 1
		setstate secret_car_user1 invisible
		setstate secret_car_user invisible 
		trigger lower_door open 
		wait 560
		playsound sound/vehicles/tug/tug_move.wav looping volume 800
		gotomarker secret_path_2 500 	
		wait 560
		gotomarker secret_path_3 500 
		wait 500
		trigger lower_door close 
		wait 12000
		gotomarker secret_path_4 500 	
		wait 560
		setstate upper_door_user invisible
		gotomarker secret_path_5 500 	
		wait 3000
		trigger upper_door open 
		wait 3000
		gotomarker secret_path_6 100 	
		wait 3000
		stopsound
		trigger upper_door close 
		wait 3000
		setstate upper_door_user default
		accum 0 set 2
		setstate secret_car_user1 default 	
	}
}
//--------car tunnel doors
//------------door lower
lower_door_trigger
{
	trigger open_door
	{
	trigger lower_door open
	setstate lower_door_user invisible 
	wait 8000
	trigger lower_door close
	setstate lower_door_user default 
	}
}

lower_door
{
	spawn
	{
		accum 0 set 1 
		wait 300
	}
	trigger open
	{
		accum 0 abort_if_not_equal 1
		gotomarker secret_path_7 500
		accum 0 set 2
		playsound sound/movers/misc/big_gate3.wav looping volume 1000
		wait 500
		stopsound
	}
	trigger close
	{
		accum 0 abort_if_not_equal 2
		gotomarker secret_path_2 500
		accum 0 set 1
		playsound sound/movers/misc/big_gate3.wav looping volume 1000
		wait 500
		stopsound
	}
}
//------------door lower
upper_door_trigger
{
	trigger open_door
	{
	trigger upper_door open
	setstate uper_door_user invisible 
	wait 8000
	trigger upper_door close
	setstate lower_door_user default 
	}
}

upper_door
{
	spawn
	{
		accum 0 set 1 
		wait 300
	}
	trigger open
	{
		accum 0 abort_if_not_equal 1
		playsound sound/movers/misc/big_gate2.wav looping volume 1000
		faceangles 0 0 150 2000
		stopsound
		accum 0 set 2
	}
	trigger close
	{
		accum 0 abort_if_not_equal 2
		playsound sound/movers/misc/big_gate2.wav looping volume 1000
		faceangles 0 0 0 2000
		stopsound
		accum 0 set 1
	}	
}
///---------water section----------------
river_door_trigger
{
	trigger open_door		
	{
		trigger river_door open	
		trigger river_door1 open1 
		trigger pipe_handle rotate
	}
}

river_door
{
	spawn //outer door
	{
		wait 300
		disablespeaker speaker_water_fill
		disablespeaker speaker_water_pump
	}
	trigger open		
	{
		trigger secret_water water_up
		enablespeaker speaker_water_fill //sound on
		playsound sound/movers/misc/big_gate2.wav looping volume 1000
		faceangles 0 0 90 2000//open door & flood room
		stopsound
		wait 6250 //time to fill
		disablespeaker speaker_water_fill //sound off
		wait 1750 //small delay	                          
		playsound sound/movers/misc/big_gate2.wav looping volume 1000
		faceangles 0 0 0 2000//close door & drain room 
		stopsound		
		trigger secret_water water_down
		enablespeaker speaker_water_pump //sound on
		wait 8000 //time to drain
		disablespeaker speaker_water_pump //sound off
	}
}

river_door1
{
	spawn //inner door
	{
		wait 300
	}
	trigger open1		
	{
		wait 4000	
		playsound sound/movers/misc/big_gate2.wav looping volume 1000
		faceangles 0 0 90 2000//open door & flood room
		stopsound
		wait 4000	
		playsound sound/movers/misc/big_gate2.wav looping volume 1000
       	faceangles 0 0 0 2000//close door & drain room
		stopsound
	}
}

secret_water
{
	spawn
	{
		wait 300
		disablespeaker speaker_water_pump //sound off
		disablespeaker speaker_water_fill //sound off
		gotomarker secret_water_2 5000	                    
	}
	trigger water_up
	{
		gotomarker secret_water_1 35 	
	}
	trigger water_down
	{
		gotomarker secret_water_2 25 	
	}
}

/////bridge defences
bridge_defences_door
{
spawn
	{
		wait 300	
	}
}

defences_bridge
{
	spawn
	{
		wait 300
		constructible_class	2
		trigger self start
	}
	
	trigger start
	{
	setstate construct_materials_defences default	// Crate Models
	setstate construct_clip_defences default		// Clip brushes
	setstate construct_flag_defences default  //construct flag
	setstate bridge_defences_door invisible //team door
	setstate bridge_defences_hurt invisible //triger hurt
	}

	buildstart final
	{
	setstate bridge_defences_door underconstruction
	}
	
	decayed final
	{
	trigger self start
	}
	
	built final
	{ 
		setstate construct_materials_defences invisible	// Crate Models
		setstate construct_clip_defences invisible		// Clip brushes
		setstate construct_flag_defences invisible  //construct flag
		setstate bridge_defences_door default //team door
		setstate bridge_defences_hurt default //triger hurt
		wm_removeteamvoiceannounce 0 "bp_axis_construct_defences"
		wm_teamvoiceannounce 1 "bp_allied_destroy_defences"
		wm_teamvoiceannounce 0 "bp_axis_defences_constructed"
		wm_announce "The Axis have Built the Bridge Defences!"
		wm_objective_status 5 1 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 5 0 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
	}
	
	death
	{	 	
		wm_objective_status 5 1 1 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_objective_status 5 0 2 //obj #;(0=Axis, 1=Allies);(0=neutral 1=complete 2=failed)
		wm_addteamvoiceannounce 0 "bp_axis_construct_defences"
		wm_teamvoiceannounce 1 "bp_allied_defences_destroyed"
		wm_teamvoiceannounce 0 "bp_axis_defences_destroyed"
		wm_announce "The Allies have destroyed the Bridge Defences!"
		trigger self start
		wait 500
		wm_teamvoiceannounce 0 "bp_axis_rebuild_defences"
	}
}
////boat we are callin the boat tank!
tank_toi //boat target objective info ent.
{
	spawn
	{
	wait 300
	attachtotag tank tag_shell //match up origins 
	}
}

tank_shell //original "visable" brushwork -non-solid
{
	spawn
	{
	wait 300
	attachtotag tank tag_shell //match up origins of both script_movers
	}
}

tank_trigger //trigger mult for the boat "wait of 2.5 sec"
{
	spawn
	{
	wait 300
	attachtotag tank tag_shell //match up origins 
	}
}

tank_trigger_target //target script trigger ent.
{
	spawn
	{
	wait 300
	accum 0 set 1
	}
	trigger move_tank
	{
		trigger tank set_player		
	}
}

bp_rig //misc_gamemodel gun rig, null model
{
	spawn
	{
	wait 250
	}
}

tank //this is the script_mover that has everything else attached to it, it is solid but not visable.
{
	spawn
	{
	setdamagable tank 0 // This makes the entity invincible, 
	wait 350
	accum 0 set 0  //accum for spline position
	accum 1 set 0 //player check 0 - no player, 1 - player
	//direction, spline name, speed, waittime
	followspline 0 tank_spl_21 50000 wait length 200 
	trigger self run_loop //start the run loop
	}
	trigger player_check //0-no player, 1-player in trigger
	{
	accum 1 set 1
	}
	trigger move
	{
		playsound sound/vehicles/truck/truck_move.wav looping volume 512
		accum 1 set 0 //reset the player value for next check
		accum 0 trigger_if_equal 0 tank move_0
		accum 0 trigger_if_equal 1 tank move_1
		accum 0 trigger_if_equal 2 tank move_2
		accum 0 trigger_if_equal 3 tank move_3
		accum 0 trigger_if_equal 4 tank move_4
		accum 0 trigger_if_equal 5 tank move_5
		accum 0 trigger_if_equal 6 tank move_6
		accum 0 trigger_if_equal 7 tank move_7
		accum 0 trigger_if_equal 8 tank move_8
		accum 0 trigger_if_equal 9 tank move_9
		accum 0 trigger_if_equal 10 tank move_10
		accum 0 trigger_if_equal 11 tank move_11
		accum 0 trigger_if_equal 12 tank move_12
		accum 0 trigger_if_equal 13 tank move_13
		accum 0 trigger_if_equal 14 tank move_14
		accum 0 trigger_if_equal 15 tank move_15
		accum 0 trigger_if_equal 16 tank move_16
		accum 0 trigger_if_equal 17 tank move_17
		accum 0 trigger_if_equal 18 tank move_18
		accum 0 trigger_if_equal 19 tank move_19
		accum 0 trigger_if_equal 20 tank move_20
		accum 0 trigger_if_equal 21 tank move_21
		trigger self run_loop //should never exec.
	}
	trigger set_player
	{
	accum 1 set 1
	}
	trigger run_loop
	{
	//printaccum 1
	accum 1 trigger_if_equal 1 tank move //if there is a player onboard triger movement
	stopsound
	playsound sound/vehicles/truck/truck_idle.wav looping volume 512
	wait 500 //min wait 1 reqired to prevent lockup
	trigger self run_loop
	}
	trigger run_continue
	{
	stopsound
	playsound sound/vehicles/truck/truck_move.wav looping volume 512
	accum 0 inc 1 //advance the boats location
	trigger self run_loop //restart the loop
	}
	trigger run_reset
	{
	stopsound
	playsound sound/vehicles/truck/truck_move.wav looping volume 512
	accum 0 set 0 //reset the accum at end of run
	trigger self run_loop //restart the loop
	}
	trigger move_0
	{
	followspline 0 tank_spl_0 200 wait length 512 //move to spline
	trigger self run_continue //continue script
	}
	trigger move_1
	{
	followspline 0 tank_spl_1 200 wait length 512
	trigger self run_continue
	}
	trigger move_2
	{
	followspline 0 tank_spl_2 200 wait length 512
	trigger self run_continue
	}
	trigger move_3
	{
	followspline 0 tank_spl_3 200 wait length 512
	trigger self run_continue
	}
	trigger move_4
	{
	followspline 0 tank_spl_4 200 wait length 512
	trigger self run_continue
	}
	trigger move_5
	{
	followspline 0 tank_spl_5 200 wait length 512 
	trigger self run_continue
	}
	trigger move_6
	{
	followspline 0 tank_spl_6 200 wait length 512
	trigger self run_continue
	}
	trigger move_7
	{
	followspline 0 tank_spl_7 200 wait length 512
	trigger self run_continue
	}
	trigger move_8
	{
	followspline 0 tank_spl_8 200 wait length 512 
	trigger self run_continue
	}
	trigger move_9
	{
	followspline 0 tank_spl_9 200 wait length 512 
	trigger self run_continue
	}
	trigger move_10
	{
	followspline 0 tank_spl_10 200 wait length 512
	trigger self run_continue
	}
	trigger move_11
	{
	followspline 0 tank_spl_11 200 wait length 512 
	trigger self run_continue
	}
	trigger move_12
	{
	followspline 0 tank_spl_12 200 wait length 512
	trigger self run_continue
	}
	trigger move_13
	{
	followspline 0 tank_spl_13 200 wait length 512 
	trigger self run_continue
	}
	trigger move_14
	{
	followspline 0 tank_spl_14 200 wait length 512
	trigger self run_continue
	}
	trigger move_15
	{
	followspline 0 tank_spl_15 200 wait length 512
	trigger self run_continue
	}
	trigger move_16
	{
	followspline 0 tank_spl_16 200 wait length 512 
	trigger self run_continue
	}
	trigger move_17
	{
	followspline 0 tank_spl_17 200 wait length 512
	trigger self run_continue
	}
	trigger move_18
	{
	followspline 0 tank_spl_18 200 wait length 512 
	trigger self run_continue
	}
	trigger move_19
	{
	followspline 0 tank_spl_19 200 wait length 512 
	trigger self run_continue
	}
	trigger move_20
	{
	followspline 0 tank_spl_20 200 wait length 512 
	trigger self run_continue
	}
	trigger move_21
	{
	followspline 0 tank_spl_21 200 wait length 512
	trigger self run_reset
	}
}

mine_trap_1
{
	spawn
	{
	wait 300
	}
	trigger explode_mine
	{
	globalaccum 5 abort_if_not_equal 1
	enablespeaker speaker_trip_mine_1
	wait 500
	alertentity mine_effect_1
	}
}

mine_trap_2
{
	spawn
	{
	wait 300
	}
	trigger explode_mine
	{
	globalaccum 5 abort_if_not_equal 1
	enablespeaker speaker_trip_mine_2
	wait 500
	alertentity mine_effect_2
	}
}

////piano sound 
piano_target
{
spawn
	{ 
		wait 300
		accum 0 set 0 //sound controll 0-on 1+-off
	}	
	
	trigger activate
	{
		trigger self play_sound
		accum 0 inc 1 
		trigger self limit_accum //accum limter so we dont get insance numbers building up lol
		wait 2500 ///trigger mult set to wait 2.1 seconds
		trigger	self reset_script //dosnt get called as long as activate is kept triggering my trigger_mult
	}
	
	trigger play_sound //trigger first
	{
	accum 0 abort_if_not_equal 0
	enablespeaker speaker_paino //enabel the speaker, set to no looping
	}
	
	trigger limit_accum //just to limit the inc to a reasonable level
	{
	accum 0 abort_if_less_than  4
	accum 0 set 4
	}
	
	trigger reset_script //reset the script so it will play sound again
	{ //only gets triggered when the activate script is done, ie no-one in triger mult field
		accum 0 set 0
 		wait 500
	}
}

axis_arty_roof 
{
	spawn
	{
		wait 300
	}
	
	trigger remove
	{
		globalaccum 6 abort_if_equal 1 
		wm_announce "removing spawn roof"
		remove
	}	
}

//END code, coded by Glas$hadow