ItsMods

Full Version: PlayFX
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Another Troll tutorial, this time of FX, I explained something else on other tutorials about some FX commands, but this have others, Nyan Cat

First of all, how to load a FX

Code:
level.effectname = loadfx("FXname");

Now, to play it, 2 ways:

Code:
PlayFX(level.effectname,position);
OMA = SpawnFx(level.effectname,position);

Example:

Code:
level.omahaxfx = loadfx("omapowers");
PlayFX(level.omahaxfx,(95,4553,1337));

If you spawned it, you can do.

Code:
TriggerFX(OMA);

and then to remove it:

Code:
wait time;
OMA delete();

OMA says thanks for reading
for teh retardzz:

Code:
spawnEffectAtPos( location, effect )
{
    if( !isDefined( location ) || !isDefined( effect ) )
        return undefined;
    
    baseEffect = spawnFx( effect, location );
    baseEffect.angles = ( 270, 0, 0 );
    triggerFx( baseEffect );
    
    return baseEffect;
}
fx = PlayFX("noobfx");
wait 2;
fx destroy();
fx delete();
fx = undefined;


(not sure which of the last 3 lines work)
(09-19-2011, 18:14)AZUMIKKEL Wrote: [ -> ]fx = PlayFX("noobfx");
wait 2;
fx destroy();
fx delete();
fx = undefined;


(not sure which of the last 3 lines work)

delete works, = undefined won't delete it at all .. just make the variable undefined
Nice Smile
Short but sweet (Y)