ItsMods

Full Version: Adding FXs from SP (zm) to MP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In this tutorial i will show how to import FXs from SP (zm too) to MP

1) First of all you need mod with the following folders (again Tongue):
<blops directory>\mods\mp_YOURMOD\fx

2)Importing
Go to <blops dir>\raw\fx and choose your favorite FX from folders and copy it to <blops directory>\mods\mp_YOURMOD\fx
Example (my fav fx):
<blops dir>\raw\fx\maps\zombie\fx_defense_zombie_boss3.efx to <blops directory>\mods\mp_YOURMOD\fx\maps\zombie\fx_defense_zombie_boss3.efx

3)Adding to Zone Source (mod.csv) file
Open your mod.csv file and put following lines:
Quote:fx, <your fx with folder>
Example:
Quote:fx,maps\zombie\fx_defense_zombie_boss3
Save mod.csv file.

5)Spawn FX in game
Open your GSC file(like your map building thing) and put this in init(), main():
Quote:loadFx("<YOUR FX>");
level._CUSTOM_FX_NAME = loadfx("<YOUR FX>");
Example;
Quote:loadFx("maps/zombie/fx_defense_zombie_boss3");
level._CUSTOM_FX_NAME = loadFx("maps/zombie/fx_defense_zombie_boss3");
NOTE! "\" (slash) need change to "/" (slash) in gsc script(loadFx) or this will not work!
Spawn:
Quote:spawnMyFx()
{
playFX(level._CUSTOM_FX_NAME, ORIGIN);
}
Thanks to iAegle for this:
effect = spawnEffect( ( 0, 0, 0 ), level._CUSTOM_FX_NAME );
for delete:
effect delete();
NOTE: With some FX need loop thread, because some fx have time!
Example
Quote:spawnMyFx()
{
for(;Wink
{
playFX(level._CUSTOM_FX_NAME, ORIGIN);
wait <time>;
}
}

4) Build your mod!
Sorry, if bad tutorial Tongue
Nice tutorial 7 Tongue
You can also use

Code:
spawnEffect( location, effect )
{
    baseEffect = spawnFx( effect, location + (0, 0, 1) );
    baseEffect.angles = ( 270, 0, 0 );
    triggerFx( baseEffect );
    
    return baseEffect;
}

and then use
Code:
effect = spawnEffect( ( 0, 0, 0 ), level._CUSTOM_FX_NAME );

so you can easily delete it like this:
Code:
effect delete();
Nice! You don't need the LoadFX twice though.
Also, is the smiley required in your mod? *grin*