Call of Duty 4: Animated LCD: Difference between revisions
Jump to navigation
Jump to search
(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…') |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 23: | Line 23: | ||
#include common_scripts\utility; | #include common_scripts\utility; | ||
#include maps\mp\_utility; | #include maps\mp\_utility; | ||
main() | main() | ||
{ | { | ||
randomStartDelay = randomfloatrange( -20, -15); | randomStartDelay = randomfloatrange( -20, -15); | ||
global_FX( "lcd_animated", "lcd_animated", "animated/lcd_animated", randomStartDelay ); | |||
} | } | ||
Line 41: | Line 34: | ||
// script_structs | // script_structs | ||
ents = getstructarray(targetname,"targetname"); | ents = getstructarray(targetname,"targetname"); | ||
if ( | if ( isdefined( ents ) ) | ||
for ( i = 0 ; i < ents.size ; i++ ) | |||
ents[i] global_FX_create( fxName, fxFile, delay, soundalias ); | |||
} | } | ||
Line 56: | Line 45: | ||
if ( !isdefined( level._effect[ fxName ] ) ) | if ( !isdefined( level._effect[ fxName ] ) ) | ||
level._effect[ fxName ] = loadfx( fxFile ); | level._effect[ fxName ] = loadfx( fxFile ); | ||
// default effect angles if they dont exist | // default effect angles if they dont exist | ||
if ( !isdefined( self.angles ) ) | if ( !isdefined( self.angles ) ) | ||
self.angles = ( 0, 0, 0 ); | self.angles = ( 0, 0, 0 ); | ||
ent = createOneshotEffect( fxName ); | ent = createOneshotEffect( fxName ); | ||
ent.v[ "origin" ] = ( self.origin ); | ent.v[ "origin" ] = ( self.origin ); | ||
Line 67: | Line 56: | ||
ent.v[ "delay" ] = delay; | ent.v[ "delay" ] = delay; | ||
if ( isdefined( soundalias ) ) | if ( isdefined( soundalias ) ) | ||
ent.v[ "soundalias" ] = soundalias; | ent.v[ "soundalias" ] = soundalias; | ||
} | } | ||
</pre> | </pre> |
Latest revision as of 22:28, 22 February 2012
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 ) ) 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)