HPL3/Amnesia: Rebirth/Scripting/Scripting Api/ParticleSystem

From Frictional Wiki
Jump to navigation Jump to search

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Summary

Return Type Function and Description
void ParticleSystem_AttachToEntity(const tString &in asPSName, const tString &in asEntityName)
Attaches a particle system to an entity
cParticleSystem ParticleSystem_CreateAtEntity(const tString &in asPSName, const tString &in asPSFile, const tString &in asEntity, bool abAttach)
Creates a particle system at entity
cParticleSystem ParticleSystem_CreateAtEntityExt(const tString &in asPSName, const tString &in asPSFile, const tString &in asEntity, bool abAttach, const cColor &in acColor, float afBrightness = 1.0f, bool abFadeAtDistance = false, float afFadeMinEnd = 1.0f, float afFadeMinStart = 2.0f, float afFadeMaxStart = 100.0f, float afFadeMaxEnd = 110.0f)
Creates a particle system at entity with extra options
void ParticleSystem_Destroy(const tString &in asPSName)
Destroy a particle system
bool ParticleSystem_Exists(const tString &in asPSName)
Returns true or false if a given particle system exists
void ParticleSystem_Preload(const tString &in asFile)
Preload particle system data
void ParticleSystem_SetActive(const tString &in asPSName, bool abActive)
Activates or deactivates a particle system
void ParticleSystem_SetBrightness(const tString &in asPSName, float afBrightness)
Sets the brightness of a particle system
void ParticleSystem_SetColor(const tString &in asPSName, const cColor &in acColor)
Sets the color of a particle system
void ParticleSystem_SetVisible(const tString &in asPSName, bool abVisible)
Sets the visibility of a particle system

Function Detail

ParticleSystem_AttachToEntity

void ParticleSystem_AttachToEntity(const tString &in asPSName,
                                   const tString &in asEntityName)

Attaches a particle system to an entity.

Parameters

Returns:

  • void

ParticleSystem_CreateAtEntity

cParticleSystem@ ParticleSystem_CreateAtEntity(const tString &in asPSName,
                                               const tString &in asPSFile,
                                               const tString &in asEntity,
                                               bool abAttach)

Creates a particle system at entity.

Parameters

Returns:

  • cParticleSystem@—cParticleSystem, the created particle system or null if the function fails.

ParticleSystem_CreateAtEntityExt

cParticleSystem@ ParticleSystem_CreateAtEntityExt(const tString &in asPSName,
                                                  const tString &in asPSFile,
                                                  const tString &in asEntity,
                                                  bool abAttach,
                                                  const cColor &in acColor,
                                                  float afBrightness = 1.0f,
                                                  bool abFadeAtDistance = false,
                                                  float afFadeMinEnd = 1.0f,
                                                  float afFadeMinStart = 2.0f,
                                                  float afFadeMaxStart = 100.0f,
                                                  float afFadeMaxEnd = 110.0f)

Creates a particle system at entity with extra options.

Parameters

  • asPSName (tString) —
  • asPSFile (tString) —
  • asEntity (tString) —
  • abAttach (bool) —
  • acColor (cColor) —
  • afBrightness (float) —
  • abFadeAtDistance (bool) —
  • afFadeMinEnd (float) —
  • afFadeMinStart (float) —
  • afFadeMaxStart (float) —
  • afFadeMaxEnd (float) —

Returns:

  • cParticleSystem@—cParticleSystem, the created particle system or null if the function fails.

ParticleSystem_Destroy

void ParticleSystem_Destroy(const tString &in asPSName)

Destroy a particle system. Can contain wildcards.

Parameters

Returns:

  • void

ParticleSystem_Exists

bool ParticleSystem_Exists(const tString &in asPSName)

Returns true or false if a given particle system exists

Parameters

Returns:

  • bool

ParticleSystem_Preload

void ParticleSystem_Preload(const tString &in asFile)

Preload particle system data

Parameters

Returns:

  • void

ParticleSystem_SetActive

void ParticleSystem_SetActive(const tString &in asPSName,
                              bool abActive)

Activates or deactivates a particle system.

Parameters

  • asPSName (tString) —
  • abActive (bool) —

Returns:

  • void

ParticleSystem_SetBrightness

void ParticleSystem_SetBrightness(const tString &in asPSName,
                                  float afBrightness)

Sets the brightness of a particle system.

Parameters

  • asPSName (tString) —
  • afBrightness (float) —

Returns:

  • void

ParticleSystem_SetColor

void ParticleSystem_SetColor(const tString &in asPSName,
                             const cColor &in acColor)

Sets the color of a particle system.

Parameters

Returns:

  • void

ParticleSystem_SetVisible

void ParticleSystem_SetVisible(const tString &in asPSName,
                               bool abVisible)

Sets the visibility of a particle system.

Parameters

  • asPSName (tString) —
  • abVisible (bool) —

Returns:

  • void