The fsVfxPlayInstance function is used to play a specified (already spawned) VFX.


bool fsVfxPlayInstance(
    FsVFXId id


Parameters Description
id The ID of the VFX to play, as returned by either fsVfxSpawnInWorld or fsVfxSpawnOnSimObject.

Return Values

The function will return TRUE if the command has been properly executed, otherwise it will return FALSE (for example if the vfx was destroyed).


if (!fsVfxIsInstancePlaying(vfxId)) {



It should be noted that calling this function will restart the internal VFX timer, so if you have set a minimum emission time for the instance, fsVfxIsMinTimePassed will be FALSE until that time is reached again. Note too that a VFX that has finished emitting, has no particles alive, and that has no static meshes, will be automatically destroyed after 100 frames, meaning that it cannot be played again without it being respawned first.


See Also