//	map arrange data
//	location: d3_c17_11

"precache" {
	"entity" "npc_citizen"
	"entity" "npc_combine_e"	
	"entity" "npc_combine_c"	
	"entity" "npc_kscanner"	
	"entity" "npc_turret_floor"
	"entity"	"monster_human_grunt"		
	"entity"	"weapon_grease"
	"entity"	"weapon_ak47"
	"entity"	"weapon_kar98"
	"entity"	"weapon_mp5"	
	"entity"	"weapon_lasergun"
	"entity"	"weapon_svd"	
	"entity" 	"weapon_custom5"
	"entity" 	"weapon_custom14"
	"entity" 	"weapon_custom15"	
	"entity" 	"weapon_custom16"
	"entity" 	"weapon_custom8"
	"entity" 	"weapon_custom18"	
	"model"	"models/combine_commando.mdl"	
}

"randomspawn" {

	"npc_combine_c" {
		"count"		"5"
		"weapon"	"weapon_mp5"
		"patrol"
	}

}

"entities" {

	"instant_trig" {
		"keyvalues" {
			"timer" "0.1"
			"label" "init"
		}
	}
	
	"instant_trig" {
		"keyvalues" {
			"timer" "0.3"
			"label" "add_ents"
		}
	}
	
	"instant_trig" {
		"keyvalues" {
			"timer" "0.2"
			"label" "remove_ents"
		}
	}
	
	"instant_trig" {
		"keyvalues" {
			"timer" "0.1"
			"label" "backups"
		}
	}
	
	"instant_trig" {
		"origin" "988 7841 988"
		"keyvalues" {
			"radius" "85"
			"label" "attakthems"
		}
	}
	
	"instant_trig" {
		"origin" "988 7841 988"
		"keyvalues" {
			"radius" "1"
			"label" "kill_backups"
		}
	}
	
	"instant_trig" {
		"origin" "-963 7827 1065"
		"keyvalues" {
			"radius" "1"
			"label" "dropship_c_health"
		}
	}
	
	"instant_trig" {
		"origin" "1325 4860 1024"
		"keyvalues" {
			"radius" "235"
			"label" "backlash_x"
		}
	}

	"event" {
		"targetname" "barney"
		"action" "addoutput"
		"value" "health 9999"
		"delaytime" "0.1"
	}

	"item_item_crate" {
		"origin" "858 7992 1024"  "angle" "0 173 360"
		"keyvalues" {
			"itemclass"		"item_ammo_357"
			"itemcount"		"2"
		}
	}
	
	"item_item_crate" {
		"origin" "795.0 7998.7 1003.7"  "angle" "16 5 25"
		"keyvalues" {
			"itemclass"		"weapon_custom18"
			"itemcount"		"1"
		}
	}	
	
	"npc_combine_s" {
		"origin" "1216 3544 1344" "angle" "0 87 0"
		"keyvalues" {
			"additionalequipment"	"weapon_svd"
		}
	}
}


"entities:remove_ents" {
	
	// skybridge_group_a_soldier_4
	"removeentity" {
		"classname" "npc_template_maker"
		"origin" "1344 3200 962"
		"radius" "1"
	}
	
	// gunship
	"removeentity" {
		"classname" "npc_template_maker"
		"origin" "2272 5504 480"
		"radius" "1"
	}
	
	// roof_soldier_group_b_1
	"removeentity" {
		"classname" "npc_combine_s"
		"origin" "1104 6112 896"
		"radius" "1"
	}
	
	// dropship_maker
	"removeentity" {
		"classname" "npc_template_maker"
		"origin" "-4020.44 4271.24 336"
		"radius" "1"
	}
	
	// skybridge_group_a_soldier_2
	"removeentity" {
		"classname" "npc_template_maker"
		"origin" "1344 3328 962"
		"radius" "1"
	}
	
	// roof_ally_replenish_manager
	"removeentity" {
		"classname" "ai_ally_manager"
		"origin" "688 7952 880"
		"radius" "1"
	}
}

"entities:add_ents" {

	// skybridge_group_a_soldier_4
	"npc_template_maker" {
		"origin" "1344 3200 962"
		"angles" "0 0 0"
		"keyvalues" {
			"targetname" "skybridge_group_a_soldiers_maker"
			"CriterionDistance" "2"
			"CriterionVisibility" "2"
			"TemplateName" "skybridge_group_a_soldier_4"
			"Radius" "256"
			"MaxLiveChildren" "1"
			"SpawnFrequency" "1"
			"MaxNPCCount" "5"
			"StartDisabled" "1"
			"spawnflags" "16"
			"additionalequipment"	"weapon_custom14"			
			"OnSpawnNPC" "skybridge_group_a_soldier_4,addoutput,health 65,0.2,1"
		}
	}
	
	// skybridge_group_a_soldier_2
	"npc_template_maker" {
		"origin" "1344 3328 962"
		"angles" "0 0 0"
		"keyvalues" {
			"targetname" "skybridge_group_a_soldiers_maker"
			"CriterionDistance" "2"
			"CriterionVisibility" "2"
			"TemplateName" "skybridge_group_a_soldier_2"
			"Radius" "256"
			"MaxLiveChildren" "1"
			"SpawnFrequency" "1"
			"MaxNPCCount" "5"
			"StartDisabled" "1"
			"spawnflags" "16"
			"additionalequipment"	"weapon_mp5"			
			"OnSpawnNPC" "skybridge_group_a_soldier_2,addoutput,health 65,0.2,1"
		}
	}
	
	// gunship
	"npc_template_maker" {
		"origin" "2272 5504 480"
		"angles" "0 187 0"
		"keyvalues" {
			"targetname" "gunship_maker"
			"CriterionDistance" "2"
			"CriterionVisibility" "2"
			"TemplateName" "gunship"
			"Radius" "256"
			"MaxLiveChildren" "1"
			"SpawnFrequency" "1"
			"MaxNPCCount" "1"
			"StartDisabled" "1"
			"spawnflags" "16"
			"OnSpawnNPC" "gunship,FlyToSpecificTrackViaPath,gunship_path_8,6,-1"
			"OnSpawnNPC" "citizens_gunship_relationship,ApplyRelationship,,0.5,-1"
			"OnSpawnNPC" "gunship_sched,StartSchedule,,0.5,-1"
			"OnSpawnNPC" "backup_citizen_maker2,Enable,,0.5,-1"
			"OnSpawnNPC" "game_s_cmd,command,instant_trig_run kill_backups,1,1"
		}
	}
	
	// roof_soldier_group_b_1
	"npc_combine_s" {
		"origin" "1104 6112 896"
		"angles" "0 229 0"
		"keyvalues" {
			"targetname" "roof_soldier_group_b_1"
			"squadname" "roof_soldier_group_a_squad"
			"spawnflags" "516"
			"additionalequipment"	"weapon_custom16"			
			"OnDeath" "roof_soldier_group_ab_counter,Add,1,0,-1"
			"OnDeath" "ground_rpgcitizen_1_maker,Enable,,0,-1"
			"OnDeath" "ground_bunkercitizen_2_maker,Enable,,0,-1"
		}
	}
	
	// dropship_maker
	"npc_template_maker" {
		"origin" "-4020.44 4271.24 336"
		"angles" "0 0 0"
		"keyvalues" {
			"targetname" "dropship_maker"
			"CriterionDistance" "2"
			"CriterionVisibility" "2"
			"TemplateName" "dropship"
			"Radius" "256"
			"MaxLiveChildren" "5"
			"SpawnFrequency" "5"
			"MaxNPCCount" "1"
			"StartDisabled" "1"
			"spawnflags" "0"
			"OnSpawnNPC" "dropship,FlyToSpecificTrackViaPath,dropship_path8,0,-1"
			"OnSpawnNPC" "game_s_cmd,command,instant_trig_run dropship_c_health,1,1"
		}
	}
}

"entities:backups" {

	"npc_maker" {
		"origin" "586.2 7769.6 256.0"  "angle" "0 0 0"
		"keyvalues" {
			"targetname" "backup_citizen_maker1"
			"startdisabled" "0"
			"SpawnFrequency" "-1"
			"MaxLiveChildren" "1"
			"NPCType" "npc_citizen"
			"NPCTargetname" "backup_citizen_1"
			"additionalequipment" "weapon_kar98"
			"spawnflags" "32"
			"OnSpawnNPC" "backup_citizen_1,addoutput,health 40,0.5,-1"
		}
	}
	
	"npc_maker" {
		"origin" "578.7 7841.1 256.0"  "angle" "0 0 0"
		"keyvalues" {
			"targetname" "backup_citizen_maker2"
			"startdisabled" "1"
			"SpawnFrequency" "-1"
			"MaxLiveChildren" "1"
			"NPCType" "npc_citizen"
			"NPCTargetname" "backup_citizen_2"
			"additionalequipment" "weapon_rpg"
			"spawnflags" "32"
			"OnSpawnNPC" "backup_citizen_2,addoutput,health 40,0.5,-1"
		}
	}
	
	"ai_goal_follow" {
		"origin" "702.3 7949.3 256.0"
		"keyvalues" {
			"targetname" "backup_citizen_follow"
			"StartActive" "1"
			"SearchType" "0"
			"MaximumState" "3"
			"Formation" "5"
			"spawnflags" "32"
			"actor" "backup_citizen_*"
			"goal" "!player"
		}
	}
	
	// OTHER STUFF.
	
	"npc_combine_s" {
		"origin" "915.8 7434.8 960.0"  "angle" "0 90 0"
		"keyvalues" {
			"additionalequipment"	"weapon_ak47"		
			"targetname" "rooftop_soldier_surprise1"
			"squadname" "rooftop_soldiercluster"
		}
	}
	
	"scripted_sequence" {
		"origin" "915.8 7434.8 960.0"  "angle" "0 272 0"
		"keyvalues" {
			"targetname" "ss_rooftop_soldier_surprise1_idle"
			"m_iszEntity" "rooftop_soldier_surprise1"
			"m_iszPostIdle" "leanwall_corner_right_idle"
			"spawnflags" "256"
		}
	}
	
	"event" {
		"targetname" "ss_rooftop_soldier_surprise1_idle"
		"action" "beginsequence"
		"delaytime" "0.1"
	}
	
	"scripted_sequence" {
		"origin" "915.8 7434.8 960.0"  "angle" "0 272 0"
		"keyvalues" {
			"targetname" "ss_rooftop_soldier_surprise1_act"
			"m_iszEntity" "rooftop_soldier_surprise1"
			"m_iszPlay" "leanwall_corner_right_exit"
		}
	}
	
	"npc_combine_s" {
		"origin" "1053.8 7400.7 960.0"  "angle" "0 163 0"
		"keyvalues" {
			"additionalequipment"	"weapon_custom8"		
			"targetname" "rooftop_soldier_surprise2"
			"squadname" "rooftop_soldiercluster"
		}
	}
	
	"npc_combine_s" {
		"origin" "445.9 7022.7 960.0"  "angle" "0 337 0"
		"keyvalues" {
			"additionalequipment"	"weapon_lasergun"		
			"targetname" "rooftop_soldier_surprise2"
			"squadname" "rooftop_soldiercluster"
		}
	}
	
	"npc_combine_s" {
		"origin" "474.3 6942.4 960.0"  "angle" "0 339 0"
		"keyvalues" {
			"additionalequipment"	"weapon_mp5"		
			"targetname" "rooftop_soldier_surprise2"
			"squadname" "rooftop_soldiercluster"
		}
	}
}

"entities:attakthems" {
	
	"event" {
		"targetname" "ss_rooftop_soldier_surprise1_idle"
		"action" "cancelsequence"
		"delaytime" "2"
	}
	
	"event" {
		"targetname" "ss_rooftop_soldier_surprise1_act"
		"action" "beginsequence"
		"delaytime" "2"
	}
}

"entities:kill_backups" {

	"event" {
		"targetname" "gunship"
		"action" "addoutput"
		"value" "OnDeath backup_citizen_maker1,Kill,,0,1"
	}
	
	"event" {
		"targetname" "gunship"
		"action" "addoutput"
		"value" "OnDeath backup_citizen_maker2,Kill,,0,1"
	}
}

"entities:dropship_c_health" {

	"event" {
		"targetname" "dropship"
		"action" "addoutput"
		"value" "OnFinishedDropoff template_combine_1,addoutput,health 65,0.2,1"
	}
}

"entities:backlash_x" {

	"monster_human_grunt" {
		"origin" "782.1 7832.1 512.0"  "angle" "0 0 0"
		"keyvalues" {
			"additionalequipment"	"weapon_custom5"		
			"targetname" "backlash_soldier1"
			"squadname" "backlash_soldiersquad"
			"runspeedmod" "1.5"				
		}
	}
	
	"aiscripted_schedule" {
		"origin" "765 7874 434"
		"keyvalues" {
			"targetname" "backlash_soldiers_sched"
			"m_iszEntity" "backlash_soldier1"
			"goalent" "!player"
			"schedule" "6"
			"forcestate" "3"
			"m_flRadius" "0"
			"spawnflags" "1028"
		}
	}
	
	"monster_human_grunt" {
		"origin" "898.4 7840.5 512.0"  "angle" "0 142 0"
		"keyvalues" {
			"additionalequipment"	"weapon_custom14"		
			"targetname" "backlash_soldier2"
			"squadname" "backlash_soldiersquad"
			"runspeedmod" "1.5"				
		}
	}
	
	"aiscripted_schedule" {
		"origin" "765 7874 434"
		"keyvalues" {
			"targetname" "backlash_soldiers_sched"
			"m_iszEntity" "backlash_soldier2"
			"goalent" "!player"
			"schedule" "6"
			"forcestate" "3"
			"m_flRadius" "0"
			"spawnflags" "1028"
		}
	}
	
	"monster_human_grunt" {
		"origin" "907.5 7920.2 512.0"  "angle" "0 180 0"
		"keyvalues" {
			"additionalequipment"	"weapon_shotgun"		
			"targetname" "backlash_soldier3"
			"squadname" "backlash_soldiersquad"
			"runspeedmod" "1.5"				
		}
	}
	
	"aiscripted_schedule" {
		"origin" "765 7874 434"
		"keyvalues" {
			"targetname" "backlash_soldiers_sched"
			"m_iszEntity" "backlash_soldier3"
			"goalent" "!player"
			"schedule" "6"
			"forcestate" "3"
			"m_flRadius" "0"
			"spawnflags" "1028"
		}
	}
	
	"monster_human_grunt" {
		"origin" "804.7 8006.0 512.0"  "angle" "0 180 0"
		"keyvalues" {
			"additionalequipment"	"weapon_custom8"		
			"targetname" "backlash_soldier4"
			"squadname" "backlash_soldiersquad"
			"runspeedmod" "1.5"				
		}
	}
	
	"aiscripted_schedule" {
		"origin" "765 7874 434"
		"keyvalues" {
			"targetname" "backlash_soldiers_sched"
			"m_iszEntity" "backlash_soldier4"
			"goalent" "!player"
			"schedule" "6"
			"forcestate" "3"
			"m_flRadius" "0"
			"spawnflags" "1028"
		}
	}
	
	"monster_human_grunt" {
		"origin" "666.5 8006.7 576.0"  "angle" "0 -90 0"
		"keyvalues" {
			"additionalequipment"	"weapon_grease"		
			"targetname" "backlash_soldier5"
			"squadname" "backlash_soldiersquad"
			"runspeedmod" "1.5"				
		}
	}
	
	"aiscripted_schedule" {
		"origin" "765 7874 434"
		"keyvalues" {
			"targetname" "backlash_soldiers_sched"
			"m_iszEntity" "backlash_soldier5"
			"goalent" "!player"
			"schedule" "6"
			"forcestate" "3"
			"m_flRadius" "0"
			"spawnflags" "1028"
		}
	}
	
	"event" {
		"targetname" "backlash_soldiers_sched"
		"action" "startschedule"
		"delaytime" "0.2"
	}

	"event" {
		"targetname" "backlash_soldier*"
		"action" "addoutput"
		"value" "health 100"
		"delaytime" "0.1"
	}	
}