Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SCR_RandomPositionalInsects Interface Reference

Spawns Insect particles around camera based on define behaviour. More...

Inheritance diagram for SCR_RandomPositionalInsects:
[legend]

Public Member Functions

override void Update (float worldTime, vector cameraPos, float timeOfDay, float rainIntensity)
 
override void OnPostInit (SCR_AmbientSoundsComponent ambientSoundsComponent, SCR_AmbientInsectsComponent ambientInsectsComponent, SignalsManagerComponent signalsManagerComponent)
 
void Update (float worldTime, vector cameraPos, float timeOfDay, float rainIntensity)
 
void OnPostInit (SCR_AmbientSoundsComponent ambientSoundsComponent, SCR_AmbientInsectsComponent ambientInsectsComponent, SignalsManagerComponent signalsManagerComponent)
 

Protected Member Functions

void UpdateGlobalModifiers (float timeOfDay, float rainIntensity)
 Updates time and weather for respective Insect groups.
 
int GetDensityMax (int insectGroup, int soundMapType)
 Get maximal density per insect group and sound map type.
 
void RemoveOutOfRangeParticles (vector cameraPos)
 Deletes Insects that are too far away.
 
void RemoveParticlesBasedOnTimeAndWeather (float timeOfDay, float rainIntensity)
 Deletes Insects that are not supposed to be spawned based on time and weather conditions.
 
void RandomizeAnimation (IEntity entity)
 Randomizes animation for Insect.
 
void UpdateInsectGroup (float worldTime, vector camPos, int insectGroup)
 Attempts to find new position to play sound based on defined ESpawnMethod.
 
vector GenerateRandomPosition (int insectGroup, vector camPos)
 Generates random position for the selected insect group around camera position.
 
SCR_InsectDef GetRandomInsectDef (SCR_InsectType insectType)
 Gets random insect def from the insect group.
 
int GetSoundMapTypeFromTerrain (inout vector worldPos, vector camPos)
 Gets sound map type from terrain.
 
void UpdateDensity ()
 Updates insect density per group and active particles.
 
void LoadConfigs ()
 Loads configs where necessary values are stored.
 

Protected Attributes

int m_iDespawnDistanceSq
 
ref array< ref SCR_RandomPositionalInsectsDefm_aRandomPositionalInsectsDef
 
ResourceName m_sDayTimeCurve
 
ResourceName m_sWindCurve
 
ref array< ref SCR_InsectGroupm_aInsectGroup = {}
 
ref array< ref SCR_InsectSpawnDefm_aSpawnDef = {}
 
ref array< ref SCR_DayTimeCurveDefm_aDayTimeCurve = {}
 
ref array< ref SCR_WindCurveDefm_aWindModifier = {}
 
SoundWorld m_SoundWorld
 
int m_iUpdatedInsectGroupIdx
 
ref array< int > m_aDensity = {}
 
ref array< float > m_aDensityModifier = {}
 
ref array< int > m_aAngleOffset = {}
 
float m_aDayTimeCurveValue [DAY_TIME_CURVE_COUNT]
 
float m_aWindCurveValue [WIND_CURVE_COUNT]
 
ref array< ref SCR_InsectParticlem_aParticles = {}
 
- Protected Attributes inherited from SCR_AmbientInsectsEffect
SCR_AmbientSoundsComponent m_AmbientSoundsComponent
 
SCR_AmbientInsectsComponent m_AmbientInsectsComponent
 
SignalsManagerComponent m_LocalSignalsManager
 

Static Protected Attributes

const int INVALID = -1
 

Detailed Description

Spawns Insect particles around camera based on define behaviour.

Member Function Documentation

◆ GenerateRandomPosition()

vector SCR_RandomPositionalInsects.GenerateRandomPosition ( int  insectGroup,
vector  camPos 
)
protected

Generates random position for the selected insect group around camera position.

Parameters
[in]insectGroup
[in]camPos
Returns

◆ GetDensityMax()

int SCR_RandomPositionalInsects.GetDensityMax ( int  insectGroup,
int  soundMapType 
)
protected

Get maximal density per insect group and sound map type.

Returns
density

◆ GetRandomInsectDef()

SCR_InsectDef SCR_RandomPositionalInsects.GetRandomInsectDef ( SCR_InsectType  insectType)
protected

Gets random insect def from the insect group.

Parameters
[in]insectType

◆ GetSoundMapTypeFromTerrain()

int SCR_RandomPositionalInsects.GetSoundMapTypeFromTerrain ( inout vector  worldPos,
vector  camPos 
)
protected

Gets sound map type from terrain.

Parameters
[in]worldPos
[in]camPos

◆ LoadConfigs()

void SCR_RandomPositionalInsects.LoadConfigs ( )
protected

Loads configs where necessary values are stored.

◆ OnPostInit()

override void SCR_RandomPositionalInsects.OnPostInit ( SCR_AmbientSoundsComponent  ambientSoundsComponent,
SCR_AmbientInsectsComponent  ambientInsectsComponent,
SignalsManagerComponent  signalsManagerComponent 
)
Parameters
[in]ambientSoundsComponent
[in]ambientInsectsComponent
[in]signalsManagerComponent

Implements SCR_AmbientInsectsEffect.

◆ RandomizeAnimation()

void SCR_RandomPositionalInsects.RandomizeAnimation ( IEntity  entity)
protected

Randomizes animation for Insect.

Parameters
[in]entity

◆ RemoveOutOfRangeParticles()

void SCR_RandomPositionalInsects.RemoveOutOfRangeParticles ( vector  cameraPos)
protected

Deletes Insects that are too far away.

Parameters
[in]cameraPos

◆ RemoveParticlesBasedOnTimeAndWeather()

void SCR_RandomPositionalInsects.RemoveParticlesBasedOnTimeAndWeather ( float  timeOfDay,
float  rainIntensity 
)
protected

Deletes Insects that are not supposed to be spawned based on time and weather conditions.

Parameters
[in]timeOfDay
[in]rainIntensity

◆ Update()

override void SCR_RandomPositionalInsects.Update ( float  worldTime,
vector  cameraPos,
float  timeOfDay,
float  rainIntensity 
)
Parameters
[in]worldTime
[in]cameraPos
[in]timeOfDay
[in]rainIntensity

Implements SCR_AmbientInsectsEffect.

◆ UpdateDensity()

void SCR_RandomPositionalInsects.UpdateDensity ( )
protected

Updates insect density per group and active particles.

◆ UpdateGlobalModifiers()

void SCR_RandomPositionalInsects.UpdateGlobalModifiers ( float  timeOfDay,
float  rainIntensity 
)
protected

Updates time and weather for respective Insect groups.

Parameters
[in]timeOfDay
[in]rainIntensity

◆ UpdateInsectGroup()

void SCR_RandomPositionalInsects.UpdateInsectGroup ( float  worldTime,
vector  camPos,
int  insectGroup 
)
protected

Attempts to find new position to play sound based on defined ESpawnMethod.

Parameters
[in]worldTime
[in]camPos
[in]insectGroup

Member Data Documentation

◆ INVALID

const int SCR_RandomPositionalInsects.INVALID = -1
staticprotected

◆ m_aAngleOffset

ref array<int> SCR_RandomPositionalInsects.m_aAngleOffset = {}
protected

◆ m_aDayTimeCurve

ref array<ref SCR_DayTimeCurveDef> SCR_RandomPositionalInsects.m_aDayTimeCurve = {}
protected

◆ m_aDayTimeCurveValue

float SCR_RandomPositionalInsects.m_aDayTimeCurveValue[DAY_TIME_CURVE_COUNT]
protected

◆ m_aDensity

ref array<int> SCR_RandomPositionalInsects.m_aDensity = {}
protected

◆ m_aDensityModifier

ref array<float> SCR_RandomPositionalInsects.m_aDensityModifier = {}
protected

◆ m_aInsectGroup

ref array<ref SCR_InsectGroup> SCR_RandomPositionalInsects.m_aInsectGroup = {}
protected

◆ m_aParticles

ref array<ref SCR_InsectParticle> SCR_RandomPositionalInsects.m_aParticles = {}
protected

◆ m_aRandomPositionalInsectsDef

ref array<ref SCR_RandomPositionalInsectsDef> SCR_RandomPositionalInsects.m_aRandomPositionalInsectsDef
protected

◆ m_aSpawnDef

ref array<ref SCR_InsectSpawnDef> SCR_RandomPositionalInsects.m_aSpawnDef = {}
protected

◆ m_aWindCurveValue

float SCR_RandomPositionalInsects.m_aWindCurveValue[WIND_CURVE_COUNT]
protected

◆ m_aWindModifier

ref array<ref SCR_WindCurveDef> SCR_RandomPositionalInsects.m_aWindModifier = {}
protected

◆ m_iDespawnDistanceSq

int SCR_RandomPositionalInsects.m_iDespawnDistanceSq
protected

◆ m_iUpdatedInsectGroupIdx

int SCR_RandomPositionalInsects.m_iUpdatedInsectGroupIdx
protected

◆ m_sDayTimeCurve

ResourceName SCR_RandomPositionalInsects.m_sDayTimeCurve
protected

◆ m_SoundWorld

SoundWorld SCR_RandomPositionalInsects.m_SoundWorld
protected

◆ m_sWindCurve

ResourceName SCR_RandomPositionalInsects.m_sWindCurve
protected

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