Here's an example, from my tank in PURE:
FBI:
Code: Select all
[SFXTypes]
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////////RESERVED
explosiongenerator0=custom:SMOKEPUFF_FX;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////END RESERVED
explosiongenerator5=custom:TANKGUN_LAUNCH_FX;
explosiongenerator6=custom:TANKGUN_GROUND_FLASH;
}
Code: Select all
#define SMOKEPUFF_FX 1024
#define TANKGUN_LAUNCH_FX 1024+5
#define TANKGUN_GROUND_FLASH 1024+6
FireWeapon1()
{
emit-sfx TANKGUN_LAUNCH_FX from flare;
}
Bad practice, all around- it's sooooo much easier to debug / modify if you have 1:1 matches for names throughout, frankly.
For many more examples on how to integrate FX, explosions, timed application of FX scripting into your games, etc., please read through NanoBlobs, it has a lot of examples
