Skip to content

Forwards and Natives

SupremeSpookmaster edited this page Nov 19, 2023 · 2 revisions

Here, you can find all of the forwards and natives provided by the Fake Particle System. To make use of these, your plugin must #include <fakeparticles>.

Natives

FPS_SpawnFakeParticle

Spawns a prop_dynamic at the given coordinates. Intended to be used to spawn fake particle effects. Returns an int value representing the entity index of the spawned model.

View Parameters
  • pos - The position at which to spawn the fake particle effect.
  • ang - The angles with which the fake particle effect should be spawned.
  • particle - The model path of the fake particle effect.
  • skin - Model skin to use for the fake particle effect.
  • sequence - Optional sequence for the fake particle effect to use.
  • rate - Optional playback rate for the fake particle effect's sequence to use, if a sequence is assigned.
  • duration - Optional duration of the fake particle effect. 0.0 or below: infinite.
  • r - Optional render color parameter for the fake particle effect to use, R value, 0-255.
  • g - Optional render color parameter for the fake particle effect to use, G value, 0-255.
  • b - Optional render color parameter for the fake particle effect to use, B value, 0-255.
  • alpha - Optional render color parameter for the fake particle effect to use, alpha value, 0-255.
  • scale - Optional model scale for the fake particle effect.

FPS_AttachFakeParticleToEntity

Attaches a prop_dynamic to the given entity. Returns an int value representing the entity index of the spawned model.

View Parameters
  • entity - The entity to attach the fake particle effect to.
  • point - The attachment point to attach the fake particle effect to.
  • particle - The model path of the fake particle effect.
  • skin - Model skin to use for the fake particle effect.
  • sequence - Optional sequence for the fake particle effect to use.
  • rate - Optional playback rate for the fake particle effect's sequence to use, if a sequence is assigned.
  • duration - Optional duration of the fake particle effect. 0.0 or below: infinite.
  • r - Optional render color parameter for the fake particle effect to use, R value, 0-255.
  • g - Optional render color parameter for the fake particle effect to use, G value, 0-255.
  • b - Optional render color parameter for the fake particle effect to use, B value, 0-255.
  • alpha - Optional render color parameter for the fake particle effect to use, alpha value, 0-255.
  • scale - Optional model scale for the fake particle effect.
  • posOffset - Optional positional offset.
  • angOffset - Optional angle offset.

FPS_SpawnBillboardParticle

Spawns a unique model at the given coordinates which simulates an env_sprite, with added customization. Billboard particles are VERY expensive and must be used sparingly, as they achieve their env_sprite simulation by spawning a unique model for every client. As such, if you believe you can achieve the effect you're looking for by using an env_sprite, please consider using that instead. Returns a Handle representing an array of all of the entity references of the models spawned by this method. Make sure you delete this Handle even if you do not use it.

View Parameters
  • pos - The position at which to spawn the fake particle effect.
  • particle - The model path of the fake particle effect.
  • skin - Model skin to use for the fake particle effect.
  • sequence - Optional sequence for the fake particle effect to use.
  • rate - Optional playback rate for the fake particle effect's sequence to use, if a sequence is assigned.
  • duration - Optional duration of the fake particle effect. 0.0 or below: infinite.
  • r - Optional render color parameter for the fake particle effect to use, R value, 0-255.
  • g - Optional render color parameter for the fake particle effect to use, G value, 0-255.
  • b - Optional render color parameter for the fake particle effect to use, B value, 0-255.
  • alpha - Optional render color parameter for the fake particle effect to use, alpha value, 0-255.
  • scale - Optional model scale for the fake particle effect.
  • xRot - Should this billboard particle turn to face its client on the X axis?
  • yRot - Should this billboard particle turn to face its client on the Y axis?
  • zRot - Should this billboard particle turn to face its client on the Z axis?

FPS_AttachBillboardParticleToEntity

Functions the same as FPS_SpawnBillboardParticle, but with the added functionality of allowing you to parent the billboard particle to a given entity. Returns a Handle representing an array of every entity reference of each of the models spawned by this method. Remember to delete this Handle even if you do not use it!

View Parameters
  • entity - The entity to attach the fake particle effect to.
  • point - The attachment point to attach the fake particle effect to.
  • particle - The model path of the fake particle effect.
  • skin - Model skin to use for the fake particle effect.
  • sequence - Optional sequence for the fake particle effect to use.
  • rate - Optional playback rate for the fake particle effect's sequence to use, if a sequence is assigned.
  • duration - Optional duration of the fake particle effect. 0.0 or below: infinite.
  • r - Optional render color parameter for the fake particle effect to use, R value, 0-255.
  • g - Optional render color parameter for the fake particle effect to use, G value, 0-255.
  • b - Optional render color parameter for the fake particle effect to use, B value, 0-255.
  • alpha - Optional render color parameter for the fake particle effect to use, alpha value, 0-255.
  • scale - Optional model scale for the fake particle effect.
  • xRot - Should this billboard particle turn to face its client on the X axis?
  • yRot - Should this billboard particle turn to face its client on the Y axis?
  • zRot - Should this billboard particle turn to face its client on the Z axis?
  • posOffset - Optional positional offset.

Forwards

Nothing yet; may be added in future releases.