Call of Duty 4: Using GSCs scripts: Difference between revisions
(New page: === Add FXs to your custom maps #1 === <i>In this example a large fire FX with metal fire sound is used</i> 1. Create a folder <i>createfx</i> under /raw/maps/ 2. In that folder create ...) |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Call of Duty 4]] | |||
=== Add FXs to your custom maps #1 === | === Add FXs to your custom maps #1 === | ||
Revision as of 01:54, 16 October 2008
Add FXs to your custom maps #1
In this example a large fire FX with metal fire sound is used
1. Create a folder createfx under /raw/maps/
2. In that folder create a new file called mp_mapname_fx.gsc, in it put the following / mapname being your map name
//_createfx generated. Do not touch!! main() { ent = maps\mp\_utility::createOneshotEffect( "firelp_vhc_lrg_pm_farview" ); ent.v[ "origin" ] = ( X, Y, Z ); ent.v[ "angles" ] = ( 270, 0, 0 ); ent.v[ "fxid" ] = "firelp_vhc_lrg_pm_farview"; ent.v[ "delay" ] = -15; ent.v[ "soundalias" ] = "fire_metal_large"; }
X, Y, Z are the coordinate where you wish to place your FX.
3. under raw/maps/mp/ create another file called mp_mapname_fx.gsc / mapname being your map name
4. put the following in it:
main() { level._effect[ "firelp_vhc_lrg_pm_farview" ] = loadfx( "fire/firelp_vhc_lrg_pm_farview" ); /# if ( getdvar( "clientSideEffects" ) != "1" ) maps\createfx\mp_mapname_fx::main(); #/ }
5. In your raw/maps/mp/mp_mapname.gsc put the following after maps\mp\_load::main();
maps\mp\mp_mapname_fx::main();
6. Last step, in your zone_source/mp_mapname.csv add this line:
fx,fire/firelp_vhc_lrg_pm_farview
This will work for any FX you see under raw/fx folder. For soundaliases its a little bit different, I found creating your own soundaliases file is best. In this example thought the soundalias fire_metal_large is from stock and load automatically on any MP map.