#include common_scripts\utility; #include maps\mp\_utility; main() { randomStartDelay = randomfloatrange( -20, -15); global_FX( "bro_nt_screen", "bro_nt_screen", "animated/bro_nt_screen", randomStartDelay ); global_FX( "bro_nt_screen_wall_tv", "bro_nt_screen_wall_tv", "animated/bro_nt_screen_wall_tv", randomStartDelay ); global_FX( "bro_nt_screen_wall_tv1", "bro_nt_screen_wall_tv1", "animated/bro_nt_screen_wall_tv1", randomStartDelay ); global_FX( "bro_nt_screen_wall_phone", "bro_nt_screen_wall_phone", "animated/bro_nt_screen_wall_phone", randomStartDelay, "bro_nt_phone" ); } global_FX( targetname, fxName, fxFile, delay, soundalias ) { // script_structs ents = getstructarray(targetname,"targetname"); if ( !isdefined( ents ) ) return; if ( ents.size <= 0 ) return; for ( i = 0 ; i < ents.size ; i++ ) ents[i] global_FX_create( fxName, fxFile, delay, soundalias ); } global_FX_create( fxName, fxFile, delay, soundalias ) { if ( !isdefined( level._effect ) ) level._effect = []; if ( !isdefined( level._effect[ fxName ] ) ) level._effect[ fxName ] = loadfx( fxFile ); // default effect angles if they dont exist if ( !isdefined( self.angles ) ) self.angles = ( 0, 0, 0 ); ent = createOneshotEffect( fxName ); ent.v[ "origin" ] = ( self.origin ); ent.v[ "angles" ] = ( self.angles ); ent.v[ "fxid" ] = fxName; ent.v[ "delay" ] = delay; if ( isdefined( soundalias ) ) { ent.v[ "soundalias" ] = soundalias; } }