Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_RandomParticleSpawnable Interface Reference

Random particle spawnable class that extends SCR_ParticleSpawnable Enables random spawning of particle effects with sounds and deterministic synchronization in multiplayer. More...

Inheritance diagram for SCR_RandomParticleSpawnable:
SCR_ParticleSpawnable SCR_BaseSpawnable

Public Member Functions

override bool CompareAttributes (SCR_BaseSpawnable other)
 Returns true when attributes are the same Returns false otherwise.
 
override void SetVariables (WorldEditorAPI api, IEntitySource source, array< ref ContainerIdPathEntry > path, int index)
 
override bool CreateObject (WorldEditorAPI api, IEntitySource source, array< ref ContainerIdPathEntry > path, int index)
 
override ParticleEffectEntity Spawn (IEntity owner, Physics parentPhysics, SCR_HitInfo hitInfo, bool snapToTerrain=false)
 Override Spawn method to initialize random particle spawning.
 
void OnDelete (IEntity owner)
 Override OnDelete to clean up timers.
 
void SCR_RandomParticleSpawnable ()
 Constructor.
 
- Public Member Functions inherited from SCR_ParticleSpawnable
void GetPositionAndRotation (out notnull array< vector > positionAndRotation)
 
ParticleEffectEntity SpawnAsChild (IEntity owner, SCR_HitInfo hitInfo, bool snapToTerrain=false)
 
- Public Member Functions inherited from SCR_BaseSpawnable
bool AlreadyExists (WorldEditorAPI api, IEntitySource source, int index)
 
void CopyToSource (WorldEditorAPI api, IEntitySource source, array< ref ContainerIdPathEntry > path, int index, string currentObjectName)
 
void GetSpawnTransform (IEntity owner, out vector outMat[4], bool localCoords=false)
 Calculates the spawn tranformation matrix for the object.
 

Protected Member Functions

int GetRepCount ()
 Helper method to get randomized repetition count.
 
float GetRandomInterval ()
 Helper method to get randomized interval time.
 
float GetSequenceRepTime ()
 Helper method to get randomized sequence repetition time.
 
bool IsInRange (IEntity owner)
 Check if the effect should be triggered based on distance.
 
void OnTimer (IEntity owner, SCR_HitInfo hitInfo)
 Timer callback for spawning particles and sounds.
 
void ScheduleNextTimer (IEntity owner, SCR_HitInfo hitInfo)
 Schedule the next timer based on sequence logic.
 
void CleanupTimer ()
 Clean up timer and reset state.
 

Protected Attributes

float m_fMaxDuration
 Maximum duration for the spawning loop (default 60 seconds)
 
float m_fMinInterval
 Minimum interval between particle spawns.
 
float m_fMaxInterval
 Maximum interval between particle spawns.
 
string m_sSoundEvent
 Sound event to play alongside particle effects.
 
float m_fTriggerDistanceMin
 Minimum distance from camera to trigger effects (optional)
 
float m_fTriggerDistanceMax
 Maximum distance from camera to trigger effects (optional, 0 = no limit)
 
int m_iRepetitionCount
 Repetition count for sequences.
 
int m_iRepetitionCountRnd
 Repetition count randomization.
 
float m_fSequenceRepetitionTime
 Sequence repetition time.
 
float m_fSequenceRepetitionTimeRnd
 Sequence repetition time randomization.
 
float m_fElapsedTime = 0
 
ref RandomGenerator m_prng = null
 
ScriptCallQueue m_CallQueue
 
int m_iCurrentRepCount
 
bool m_bInSequence = false
 
- Protected Attributes inherited from SCR_BaseSpawnable
vector m_vOffsetPosition
 
vector m_vOffsetRotation
 

Additional Inherited Members

- Public Attributes inherited from SCR_ParticleSpawnable
ResourceName m_Particle
 
bool m_bAtCenter
 
bool m_bDirectional
 

Detailed Description

Random particle spawnable class that extends SCR_ParticleSpawnable Enables random spawning of particle effects with sounds and deterministic synchronization in multiplayer.

Constructor & Destructor Documentation

◆ SCR_RandomParticleSpawnable()

void SCR_RandomParticleSpawnable.SCR_RandomParticleSpawnable ( )

Constructor.

Member Function Documentation

◆ CleanupTimer()

void SCR_RandomParticleSpawnable.CleanupTimer ( )
protected

Clean up timer and reset state.

◆ CompareAttributes()

override bool SCR_RandomParticleSpawnable.CompareAttributes ( SCR_BaseSpawnable other)

Returns true when attributes are the same Returns false otherwise.

Implements SCR_ParticleSpawnable.

◆ CreateObject()

override bool SCR_RandomParticleSpawnable.CreateObject ( WorldEditorAPI api,
IEntitySource source,
array< ref ContainerIdPathEntry > path,
int index )

Implements SCR_ParticleSpawnable.

◆ GetRandomInterval()

float SCR_RandomParticleSpawnable.GetRandomInterval ( )
protected

Helper method to get randomized interval time.

◆ GetRepCount()

int SCR_RandomParticleSpawnable.GetRepCount ( )
protected

Helper method to get randomized repetition count.

◆ GetSequenceRepTime()

float SCR_RandomParticleSpawnable.GetSequenceRepTime ( )
protected

Helper method to get randomized sequence repetition time.

◆ IsInRange()

bool SCR_RandomParticleSpawnable.IsInRange ( IEntity owner)
protected

Check if the effect should be triggered based on distance.

◆ OnDelete()

void SCR_RandomParticleSpawnable.OnDelete ( IEntity owner)

Override OnDelete to clean up timers.

◆ OnTimer()

void SCR_RandomParticleSpawnable.OnTimer ( IEntity owner,
SCR_HitInfo hitInfo )
protected

Timer callback for spawning particles and sounds.

◆ ScheduleNextTimer()

void SCR_RandomParticleSpawnable.ScheduleNextTimer ( IEntity owner,
SCR_HitInfo hitInfo )
protected

Schedule the next timer based on sequence logic.

◆ SetVariables()

override void SCR_RandomParticleSpawnable.SetVariables ( WorldEditorAPI api,
IEntitySource source,
array< ref ContainerIdPathEntry > path,
int index )

Implements SCR_ParticleSpawnable.

◆ Spawn()

override ParticleEffectEntity SCR_RandomParticleSpawnable.Spawn ( IEntity owner,
Physics parentPhysics,
SCR_HitInfo hitInfo,
bool snapToTerrain = false )

Override Spawn method to initialize random particle spawning.

Implements SCR_ParticleSpawnable.

Member Data Documentation

◆ m_bInSequence

bool SCR_RandomParticleSpawnable.m_bInSequence = false
protected

◆ m_CallQueue

ScriptCallQueue SCR_RandomParticleSpawnable.m_CallQueue
protected

◆ m_fElapsedTime

float SCR_RandomParticleSpawnable.m_fElapsedTime = 0
protected

◆ m_fMaxDuration

float SCR_RandomParticleSpawnable.m_fMaxDuration
protected

Maximum duration for the spawning loop (default 60 seconds)

◆ m_fMaxInterval

float SCR_RandomParticleSpawnable.m_fMaxInterval
protected

Maximum interval between particle spawns.

◆ m_fMinInterval

float SCR_RandomParticleSpawnable.m_fMinInterval
protected

Minimum interval between particle spawns.

◆ m_fSequenceRepetitionTime

float SCR_RandomParticleSpawnable.m_fSequenceRepetitionTime
protected

Sequence repetition time.

◆ m_fSequenceRepetitionTimeRnd

float SCR_RandomParticleSpawnable.m_fSequenceRepetitionTimeRnd
protected

Sequence repetition time randomization.

◆ m_fTriggerDistanceMax

float SCR_RandomParticleSpawnable.m_fTriggerDistanceMax
protected

Maximum distance from camera to trigger effects (optional, 0 = no limit)

◆ m_fTriggerDistanceMin

float SCR_RandomParticleSpawnable.m_fTriggerDistanceMin
protected

Minimum distance from camera to trigger effects (optional)

◆ m_iCurrentRepCount

int SCR_RandomParticleSpawnable.m_iCurrentRepCount
protected

◆ m_iRepetitionCount

int SCR_RandomParticleSpawnable.m_iRepetitionCount
protected

Repetition count for sequences.

◆ m_iRepetitionCountRnd

int SCR_RandomParticleSpawnable.m_iRepetitionCountRnd
protected

Repetition count randomization.

◆ m_prng

ref RandomGenerator SCR_RandomParticleSpawnable.m_prng = null
protected

◆ m_sSoundEvent

string SCR_RandomParticleSpawnable.m_sSoundEvent
protected

Sound event to play alongside particle effects.


The documentation for this interface was generated from the following file: