The Microsoft Flight Simulator 2024 VFX API permits you to spawn visual effects that have previously been defined using The Visual Effects Editor.

 

The functions available for this API are as follows:

 

FunctionDescription
fsVfxSpawnInWorldSpawn a VFX instance somewhere in the world.
fsVfxSpawnOnSimObjectSpawn a VFX instance on a SimObject.
fsVfxPlayInstanceStart a VFX instance playing.
fsVfxStopInstanceStop the given VFX instance from playing (this does not remove any particles that have already spawned).
fsVfxDestroyInstanceDestroy the given VFX instance, removing any spawned particles from the simulation.
fsVfxIsInstancePlayingCheck if the given VFX instance is playing or not.
fsVfxIsMinTimePassedCheck if the minimum emission time specified in the spawn function has passed or not for the given VFX instance.
fsVfxIsValidCheck if the given FX instance ID is valid.
fsVfxSetOffsetSet the offset of the VFX.
fsVfxSetWorldPositionSet the Latitude, Longitude and Altitude of the VFX.
fsVfxSetRotationSet the rotation of the VFX.

 

You can find a sample project to use as a reference when using the VFX API here:

 

 

Typedefs

When using this API the following typedefs exist to help:

 

 

FsSimObjId

The ID of a SimObject. You can use 0, which is considered a “special” value that will always correspond to the current user SimObject ID.

typedef unsigned long FsSimObjId;

 

 

FsVfxId

FsVFXId is the ID of a previously defined VFX, while FSVFXID_NULL is a null ID macro, which will be returned by the spawn functions if something has gone wrong.

typedef long long FsVfxId;
#define FSVFXID_NULL 0xffffffff

 

 

FsVfxGraphParam

FsVfxGraphParamis a struct that contains the following parameters (used to set the values in a GraphParameter node):

typedef struct {
    const char* paramName;
    const char* RPNExpression;
} FsVfxGraphParam;
  • paramName: the name of the graph parameter.
  • RPNExpression: an RPN expression.

 

0/255