//fetchinist군의 cri_killhouse 스크립트
//최종 수정일 - 2005년 1월 1일
//제 동의 없이 무단으로 수정할 수 없으며, 배포 할 수 없습니다.
//레벨 디자이너 툴 공부에만 수정을 허락합니다.
//We need hula!!

game_manager
{
	spawn
	{
		wm_axis_respawntime 25
		wm_allied_respawntime 20
		wm_set_round_timelimit 25

		wm_setwinner 0

		wm_set_defending_team 0

		wait 100
		setautospawn "Allies spawn" 1
		setautospawn "Axis spawn" 0

		wait 2000
		wm_addteamvoiceannounce 0 "battery_axis_generator_defend"

		wm_addteamvoiceannounce 1 "battery_allies_generator_destroy"

		wm_teamvoiceannounce 0 "battery_axis_generator_defend"

		wm_teamvoiceannounce 1 "battery_allies_generator_destroy"

		wait 1000
		wm_announce "^3Thanks for playing this map"
		wait 2000
		wm_announce "^1Kaworuchan ^3and ^1Dalsim ^3I love you"
		wait 3000
		wm_announce "^3hula hula hula!! - fetchinist"
	}

	trigger objective
	{
		wm_announce "^1Generator ^7destroyed"

		wm_addteamvoiceannounce 0 "battery_axis_generator_destroyed"

		wm_addteamvoiceannounce 1 "battery_allies_generator_destroyed"

		wm_teamvoiceannounce 0 "battery_axis_generator_destroyed"

		wm_teamvoiceannounce 1 "battery_allies_generator_destroyed"

		trigger game_manager checkgame
	}

	trigger checkgame
	{
		wm_setwinner 1
		wait 7000
		wm_endround
	}

}

generator
{
		spawn
		{
			constructible_class 3
		}

		death
		{
			trigger game_manager objective
		}
}

blockway_wall
{
	spawn
	{
		constructible_class 3
	}

	death
	{
		wm_announce "^1Blockway wall ^7destroyed"

		wm_addteamvoiceannounce 0 "radar_axis_entrance1_destroyed"

		wm_addteamvoiceannounce 1 "radar_allies_entrance1_destroyed"

		wm_teamvoiceannounce 0 "radar_axis_entrance1_destroyed"

		wm_teamvoiceannounce 1 "radar_allies_entrance1_destroyed"

		wait 2000

		wm_removeteamvoiceannounce 0 "radar_axis_entrance1_destroyed"

		wm_removeteamvoiceannounce 1 "radar_allies_entrance1_destroyed"
	}
}

north_bridge
{
	spawn
	{
		wait 400
		trigger north_bridge setup
		constructible_class 2
	}

	trigger setup
	{
		setstate north_bridge invisible

		setstate north_bridge_cm default
		setstate north_bridge_m default
	}

	buildstart final
	{
		setstate north_bridge underconstruction

		setstate north_bridge_cm default
		setstate north_bridge_m default
	}

	built final
	{
		setstate north_bridge default

		setstate north_bridge_cm invisible
		setstate north_bridge_m invisible

		wm_announce "^1North bridge ^7constructed"

		wm_addteamvoiceannounce 0 "fueldump_axis_bridge_constructed"

		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_constructed"

		wm_teamvoiceannounce 0 "fueldump_axis_bridge_constructed"

		wm_teamvoiceannounce 1 "fueldump_allies_bridge_constructed"

		wait 2000

		wm_removeteamvoiceannounce 0 "fueldump_axis_bridge_constructed"

		wm_removeteamvoiceannounce 1 "fueldump_allies_bridge_constructed"
	}

	death
	{
		setstate north_bridge invisible

		setstate north_bridge_cm default
		setstate north_bridge_m default

		wm_announce "^1North bridge ^7destroyed"

		wm_addteamvoiceannounce 0 "fueldump_axis_bridge_destroyed"

		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_destroyed"
		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_construct"

		wm_teamvoiceannounce 0 "fueldump_axis_bridge_destroyed"

		wm_teamvoiceannounce 1 "fueldump_allies_bridge_destroyed"
		wm_teamvoiceannounce 1 "fueldump_allies_bridge_construct"

		wait 2000

		wm_removeteamvoiceannounce 0 "fueldump_axis_bridge_destroyed"

		wm_removeteamvoiceannounce 1 "fueldump_allies_bridge_destroyed"
		wm_removeteamvoiceannounce 1 "fueldump_allies_bridge_construct"
	}
}

south_bridge
{
	spawn
	{
		wait 400
		trigger south_bridge setup
		constructible_class 3
	}

	trigger setup
	{
		setstate south_bridge invisible

		setstate south_bridge_cm default
		setstate south_bridge_m default
	}

	buildstart final
	{
		setstate south_bridge underconstruction

		setstate south_bridge_cm default
		setstate south_bridge_m default
	}

	built final
	{
		setstate south_bridge default

		setstate south_bridge_cm invisible
		setstate south_bridge_m invisible

		wm_announce "^1South bridge ^7constructed"

		wm_addteamvoiceannounce 0 "fueldump_axis_bridge_constructed"

		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_constructed"

		wm_teamvoiceannounce 0 "fueldump_axis_bridge_constructed"

		wm_teamvoiceannounce 1 "fueldump_allies_bridge_constructed"

		wait 2000

		wm_removeteamvoiceannounce 0 "fueldump_axis_bridge_constructed"

		wm_removeteamvoiceannounce 1 "fueldump_allies_bridge_constructed"
	}

	death
	{
		setstate south_bridge invisible

		setstate south_bridge_cm default
		setstate south_bridge_m default

		wm_announce "^1South bridge ^7destroyed"

		wm_addteamvoiceannounce 0 "fueldump_axis_bridge_destroyed"

		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_destroyed"
		wm_addteamvoiceannounce 1 "fueldump_allies_bridge_construct"

		wm_teamvoiceannounce 0 "fueldump_axis_bridge_destroyed"

		wm_teamvoiceannounce 1 "fueldump_allies_bridge_destroyed"
		wm_teamvoiceannounce 1 "fueldump_allies_bridge_construct"

		wait 2000

		wm_removeteamvoiceannounce 0 "fueldump_axis_bridge_destroyed"

		wm_removeteamvoiceannounce 1 "fueldump_allies_bridge_destroyed"
		wm_removeteamvoiceannounce 1 "fueldump_allies_bridge_construct"
	}
}

roof_fortification
{
	spawn
	{
		wait 400
		trigger roof_fortification setup
		constructible_class 2
	}

	trigger setup
	{
		setstate roof_fortification invisible

		setstate roof_fortification_cm default
		setstate roof_fortification_m default
	}

	buildstart final
	{
		setstate roof_fortification underconstruction

		setstate roof_fortification_cm default
		setstate roof_fortification_m default
	}

	built final
	{
		setstate roof_fortification default

		setstate roof_fortification_cm invisible
		setstate roof_fortification_m invisible

		wm_announce "^1Roof fortification ^7constructed"

		wm_addteamvoiceannounce 0 "axis_hq_const_completed"

		wm_addteamvoiceannounce 1 "radar_allies_entrance1_destroy"

		wm_teamvoiceannounce 0 "axis_hq_const_completed"

		wm_teamvoiceannounce 1 "radar_allies_entrance1_destroy"

		wait 2000

		wm_removeteamvoiceannounce 0 "axis_hq_const_completed"

		wm_removeteamvoiceannounce 1 "radar_allies_entrance1_destroy"
	}

	death
	{
		setstate roof_fortification invisible

		setstate roof_fortification_cm default
		setstate roof_fortification_m default

		wm_announce "^1Roof fortification ^7destroyed"

		wm_addteamvoiceannounce 0 "radar_axis_entrance1_destroyed"

		wm_addteamvoiceannounce 1 "radar_allies_entrance1_destroyed"

		wm_teamvoiceannounce 0 "radar_axis_entrance1_destroyed"

		wm_teamvoiceannounce 1 "radar_allies_entrance1_destroyed"

		wait 2000

		wm_removeteamvoiceannounce 0 "radar_axis_entrance1_destroyed"

		wm_removeteamvoiceannounce 1 "radar_allies_entrance1_destroyed"
	}
}

allied_compost_built
{
	spawn
	{
		wait 400
		trigger allied_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0
	}

	buildstart final
	{
		setstate allied_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate allied_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger allied_compost_built_model enable_allied_features

		enablespeaker allies_compost_sound
	}

	decayed final
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate allied_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger allied_compost_built_model disable_allied_features

		disablespeaker allies_compost_sound
	}
}

allied_compost_built_model
{
	spawn
	{
		wait 400
		setstate allied_compost_built_model invisible
	}

	trigger enable_allied_features
	{
		setchargetimefactor 1 soldier 0.75
		setchargetimefactor 1 lieutenant 0.75
		setchargetimefactor 1 medic 0.75
		setchargetimefactor 1 engineer 0.75
		setchargetimefactor 1 covertops 0.75
		sethqstatus 1 1

		wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed"

		wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_announce "^1Allied Command Post ^7constructed"
	}

	trigger disable_allied_features
	{
		setchargetimefactor 1 soldier 1
		setchargetimefactor 1 lieutenant 1
		setchargetimefactor 1 medic 1
		setchargetimefactor 1 engineer 1
		setchargetimefactor 1 covertops 1
		sethqstatus 1 0

		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "allies_hq_compost_damaged"

		wm_announce "^1Allied Command Post ^7destroyed"
	}
}

axis_compost_built
{
	spawn
	{
		wait 400
		trigger axis_compost_built setup

		constructible_class 2
	}

	trigger setup
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0
	}

	buildstart final
	{
		setstate axis_compost_built_model underconstruction
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible
	}

	built final
	{
		setstate axis_compost_built_model default
		setstate neutral_compost_closed_clip invisible
		setstate neutral_compost_closed_model invisible

		trigger axis_compost_built_model enable_axis_features

		enablespeaker axis_compost_sound
	}

	decayed final
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default
	}

	death
	{
		setstate axis_compost_built_model invisible
		setstate neutral_compost_closed_clip default
		setstate neutral_compost_closed_model default

		trigger axis_compost_built_model disable_axis_features

		disablespeaker axis_compost_sound
	}
}

axis_compost_built_model
{
	spawn
	{
		wait 400
		setstate axis_compost_built_model invisible
	}

	trigger enable_axis_features
	{
		setchargetimefactor 0 soldier 0.75
		setchargetimefactor 0 lieutenant 0.75
		setchargetimefactor 0 medic 0.75
		setchargetimefactor 0 engineer 0.75
		setchargetimefactor 0 covertops 0.75
		sethqstatus 0 1

		wm_teamvoiceannounce 0 "axis_hq_compost_constructed"

		wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis"

		wm_removeteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_removeteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_announce "^1Axis Command Post ^7constructed"
	}

	trigger disable_axis_features
	{
		setchargetimefactor 0 soldier 1
		setchargetimefactor 0 lieutenant 1
		setchargetimefactor 0 medic 1
		setchargetimefactor 0 engineer 1
		setchargetimefactor 0 covertops 1
		sethqstatus 0 0

		wm_addteamvoiceannounce 0 "axis_hq_compost_construct"

		wm_addteamvoiceannounce 1 "allies_hq_compost_construct"

		wm_teamvoiceannounce 0 "axis_hq_compost_construct"

		wm_teamvoiceannounce 1 "allies_hq_compost_damaged"

		wm_announce "^1Axis Command Post ^7destroyed"
	}
}

//잡동사니
door
{
	spawn
	{
		wait 100
	}
	trigger move
	{
		gotomarker door_p 10000 wait
	}
	trigger rmove
	{
		gotomarker door_p2 10000 wait
	}
}

door_s
{
	spawn
	{
		wait 100
	}
	trigger move
	{
		trigger door move
	}
}

door_r
{
	spawn
	{
		wait 100
	}
	trigger move
	{
		trigger door rmove
	}
}

record //레코드판
{
	spawn
	{
		wait 100
		trigger self move
	}
	trigger move
	{
		setrotation 0 500 0
	}
}

star //나무별
{
	spawn
	{
		wait 100
		trigger self move
	}
	trigger move
	{
		setrotation 0 100 0
	}
}

santa //산타
{
	spawn
	{
		wait 100
		trigger self move
	}
	trigger move
	{
		gotomarker point2 150 wait
		faceangles 0 90 0 1000
		gotomarker point3 150 wait
		faceangles 0 180 0 1000
		gotomarker point4 150 wait
		faceangles 0 270 0 1000
		gotomarker point1 150 wait
		faceangles 0 0 0 1000
		trigger self move
	}
}