The fsVfxDestroyInstance function is used to destroy a (previously spawned) VFX instance.


bool fsVfxDestroyInstance(
    FsVfxId id


Parameters Description
id The ID of the VFX to destroy, 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).





All VFX that you spawn in the world or on a SimObject, should be destroyed when no longer required. Note that this will happen automatically when a VFX has finished emitting, has no particles alive, and has no static meshes, however it will take 100 frames before this automatic clean up occurs. Therefor you are encouraged to always call this function when possible to maintain performance and properly track which VFX instances should be in the world at any given time.


See Also