#include maps\_utility;
#include common_scripts\utility;
#include maps\_anim;

#using_animtree("generic_human");

main()
{

maps\_load::main();
thread anim_part();

level.player.ignoreme = true; 
level.player takeallweapons();
level.player giveWeapon( "usp_silencer" );
level.player givemaxammo( "usp_silencer");
level.player setViewmodel( "viewhands_black_kit" );

thread switchweapon();

civ_trigg = getEnt( "civ_trigg", "targetname" );
civ_trigg waittill ( "trigger" );
thread runner();
}

switchweapon()
{
wait 4;
level.player switchtoWeapon( "usp_silencer" );
}

runner()
{
    civilian1_spawner = getentarray( "civilian1_spawner", "targetname");
	for(i=0; i<civilian1_spawner.size; i++)
	civilian1_spawner[i] stalingradSpawn();
	
	wait 0.2;
   	level.civilian1 = get_living_ai( "civilian1", "script_noteworthy");
   	level.civilian2 = get_living_ai( "civilian2", "script_noteworthy");
    level.civilian1 thread civ_properties();
    level.civilian2 thread civ_properties();
   
}

civ_properties()
{
	self set_generic_run_anim("run_panicked1");
    self setgoalnode(self.target , "targetname");
	self gun_remove();	
	
	civ_delete_trigg = getEnt( "civ_delete_trigg", "targetname" );
	civ_delete_trigg waittill ( "trigger" );
	self delete();
}

anim_part()
{
	level.scr_anim[ "generic" ][ "run_panicked1" ] 					 = %unarmed_panickedrun_loop_V1;
	level.scr_anim[ "generic" ][ "run_panicked2" ] 					 = %unarmed_panickedrun_loop_V2;	
}