#include clientscripts\_utility; #include clientscripts\_fx; #include clientscripts\_music; main() { clientscripts\createfx\zombie_cod5_factory_fx::main(); clientscripts\_fx::reportNumEffects(); footsteps(); precache_scripted_fx(); precache_createfx_fx(); level thread trap_fx_monitor("warehouse_trap","warehouse"); level thread trap_fx_monitor("wuen_trap", "wuen"); level thread trap_fx_monitor("bridge_trap", "bridge"); disableFX = GetDvarInt( "disable_fx" ); if( !IsDefined( disableFX ) || disableFX <= 0 ) { precache_scripted_fx(); } level thread perk_wire_fx( "pw0", "pad_0_wire", "t01" ); level thread perk_wire_fx( "pw1", "pad_1_wire", "t11" ); level thread perk_wire_fx( "pw2", "pad_2_wire", "t21" ); level thread teleporter_map_light( "sm_light_tp_0", "t01" ); level thread teleporter_map_light( "sm_light_tp_1", "t11" ); level thread teleporter_map_light( "sm_light_tp_2", "t21" ); level.map_light_receiver_on = false; level thread teleporter_map_light_receiver(); level thread dog_start_monitor(); level thread dog_stop_monitor(); level thread level_fog_init(); level thread light_model_swap( "smodel_light_electric", "lights_indlight_on" ); level thread light_model_swap( "smodel_light_electric_milit", "lights_milit_lamp_single_int_on" ); level thread light_model_swap( "smodel_light_electric_tinhatlamp", "lights_tinhatlamp_on" ); level thread flytrap_lev_objects(); } trap_fx_monitor(name,side) { while(1) { level waittill(name); fire_points = getstructarray(name,"targetname"); for(i=0;i 0 ) { guide = guide_structs[0]; dist = DistanceSquared(ent.origin, guide.origin); for ( i=1; i= spots.size ) { index = 0; } if ( index == start_index ) { interval = interval - 0.1; z_increment = 15; } if ( interval <= 0.1 && index == 0 ) { stop_spinning = true; } offset = offset + z_increment; self MoveTo( spots[index].origin+(0,0,offset), interval ); wait( interval ); } end_spot = GetStruct( "trap_flyaway_spot", "targetname" ); self MoveTo( end_spot.origin+(RandomFloatRange(-100,100),0,0), 5 ); playsound( 0, "shoot_off", self.origin ); wait( 4.7 ); level notify( "delete_sound_ent" ); deletefakeent(0,sound_ent); self delete(); } flytrap_audio_mover( sound_ent ) { level endon( "delete_sound_ent" ); while (1) { realwait(0.05); setfakeentorg( 0, sound_ent, self.origin); } }