Call of Duty 4: Animated LCD

From COD Modding & Mapping Wiki
Revision as of 12:49, 22 June 2010 by Zeroy (talk | contribs) (Created page with 'right This tutorial will help you add an Modern Animated LCD in your COD4 Levels<br><br> = Files needed = *You can grab the file [http://wiki.modsrepo…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This tutorial will help you add an Modern Animated LCD in your COD4 Levels

Files needed

  • You can grab the file HERE
  • Once downloaded, extract the folder RAW in Your_COD_root/raw folder, and extract the folder PREFABS inside Your_COD_root/map_source folder

In Radiant

  • Open Radiant and your level, then add the new prefab from map_source/prefabs/animmodels

In GSC Files

  • In your main map's GSC add this line right after maps\mp\_load::main();
maps\mp\mp_yourmap_struct::main();
  • In folder raw/maps/mp make new GSC fila and name it mp_yourmap_struct.gsc
  • Copy/paste this inside:
#include common_scripts\utility;
#include maps\mp\_utility;
	
main()
{
randomStartDelay = randomfloatrange( -20, -15);

			global_FX( "lcd_animated", "lcd_animated", "animated/lcd_animated", randomStartDelay );
		
                  
			

		

}

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;
	}
}

In Zone File

  • In your map's zone fila add this two lines:
fx,animated/lcd_animated
rawfile,maps/mp/mp_yourmap_struct.gsc
Change yourmap name with your map name.

Credits

  • Prefab and tutorial by Miregrobar
  • Custom models by Red Beret
  • Zeroy for help on Fx


--Zeroy. 09:49, 22 June 2010 (UTC)