class ParticleSource
ParticleSource › Particle › ParticleBase › Entity › ObjectTyped › Object › IEntity › Managed
All members, including inherited
Legacy way of using particles in the game
Constructors 1
Constants 1
static private const int MAX_EMITORS = 30DEPRECATED
Members 17
protected int m_ParticleIDID from ParticleList if assigned
protected float m_LifetimeApprox. remaining lifetime of particle
protected bool m_IsRepeatWhether this particle repeats
private bool m_MarkedForDeletionWhether this particle is queued for deletion
bool m_WiggleProcessingUsed for Wiggle API, to signal that wiggle API is currently doing work
bool m_ForceOrientationRelativeToWorldUsed for Wiggle API, to restore after unparenting
vector m_DefaultOriUsed for Wiggle API, to restore after unparenting
vector m_DefaultPosUsed for Wiggle API, to restore after unparenting
vector m_DefaultWorldOriUsed for Wiggle API, to restore after unparenting
vector m_DefaultWorldPosUsed for Wiggle API, to restore after unparenting
float m_MaxOriWiggleUsed for Wiggle API, Wiggle room [-m_MaxOriWiggle, m_MaxOriWiggle]
Show 2 more
, ParticleSource.OnParticleUnParented(), and ParticleSource.SetWiggle()float m_MaxOriIntervalUsed for Wiggle API, Interval for wiggling [0, m_MaxOriInterval[
ref Timer m_RandomizeOriUsed for Wiggle API, calls the Wiggle functionality
Show 3 more
, StopWiggle(), ParticleSource.OnParticleStop(), and ParticleSource.RandomizeOrientation()protected Object m_ParentObjectShow 2 more
, ParticleSource.OnParticleParented(), and ParticleSource.OnParticleUnParented()protected Object m_ParticleEffectThe child object which contains the actual particle
Show 17 more
, GetDirectParticleEffect(), GetMaxLifetime(), GetParameter(), GetParameterEx(), GetParameterOriginal(), GetParticleCount(), HasActiveParticle(), IncrementParticleParam(), IncrementParticleParamFromOriginal(), IsRepeat(), OnCheckAutoDelete(), ScaleParticleParam(), ScaleParticleParamFromOriginal(), SetParameter(), SetParticleParam(), UpdateState(), and ParticleSource.ParticleSource()protected int m_PreviousFrameDEPRECATED
private vector m_GlobalPosPreviousFrameDEPRECATED
Methods 44
protected void ParticleInit()Purely here so that it can be emptied in ParticleSource
static Particle CreateOnObject(int particle_id, Object parent_obj, vector local_pos = "0 0 0", vector local_ori = "0 0 0", bool force_world_rotation = false)Creates a particle emitter and attaches it on the given object
particle_idintParticle ID registered in ParticleListparent_objObjectInstance on which this particle will be attachedlocal_posvectorAttachment position local to the parent (Optional)local_orivectorOrientation local to the parent (Pitch, Yawn, Roll in degrees) (Optional)force_world_rotationboolForces particle's orientation to rotate relative to the world and not with the object (Optional)
Returns: Particle Created particle instance
Show 3 more
, Object.GetPosition(), Vector(), and m_DefaultOristatic Particle Create(int particle_id, Object parent_obj, vector local_pos = "0 0 0", vector local_ori = "0 0 0")Legacy function for backwards compatibility
static Particle CreateInWorld(int particle_id, vector global_pos, vector global_ori = "0 0 0", bool force_world_rotation = false)Creates a particle emitter on the given position
particle_idintParticle ID registered in ParticleListglobal_posVectorPosition where the particel will be createdglobal_orivectorOrientation (Pitch, Yawn, Roll in degrees) (Optional)force_world_rotationboolForces particle's orientation to rotate relative to the world and not with the object (Optional)
Returns: Particle Created particle instance
Show 2 more
, SetSource(), and m_ForceOrientationRelativeToWorldLegacy function for backwards compatibility with 1.01 and below
static Particle PlayOnObject(int particle_id, Object parent_obj, vector local_pos = "0 0 0", vector local_ori = "0 0 0", bool force_world_rotation = false)Creates a particle emitter, attaches it on the given object and activates it
particle_idintParticle ID registered in ParticleListparent_objObjectInstance on which this particle will be attachedlocal_posvectorAttachment position local to the parent (Optional)local_orivectorOrientation local to the parent (Pitch, Yaw, Roll in degrees) (Optional)force_world_rotationboolForces particle's orientation to rotate relative to the world and not with the object (Optional)
Returns: Particle Created particle instance
static Particle Play(int particle_id, Object parent_obj, vector local_pos = "0 0 0", vector local_ori = "0 0 0")Legacy function for backwards compatibility with 1.01 and below
Creates a particle emitter on the given position and activates it
particle_idintParticle ID registered in ParticleListglobal_posVectorPosition where the particel will be created
Returns: Particle Created particle instance
Legacy function for backwards compatibility with 1.01 and below
override void PlayParticle(int particle_id = -1)Method to tell the particle to start playing
particle_idintParticle ID registered in ParticleList to start playing
Method to tell the particle to start playing
particle_idintParticle ID registered in ParticleList to start playingflagsintFlags to pass to the playing (None on this level)
Returns: bool Whether the particle successfully started
void Play(int particle_id = -1)Legacy function for backwards compatibility with 1.01 and below
particle_idintParticle ID registered in ParticleList to start playing
Method to tell the particle to stop playing
flagsintFlags to pass to the stopping (None on this level)
Returns: bool Whether the particle successfully stopped
Show 5 more
, ParticleBase.OnParticleStop(), IEntity.RemoveChild(), Object.SetPosition(), Object.ToDelete(), and UpdateState()void Stop()Legacy function for backwards compatibility with 1.14 and below
Show 29 more
, CrashBase.EEDelete(), CupidsBoltSimulation.~CupidsBoltSimulation(), CupidsBoltSimulation.OnFire(), DestructionEffectBase.~DestructionEffectBase(), DynamicArea_Flare.EEDelete(), EasterEgg.~EasterEgg(), EasterEgg.OnInventoryEnter(), Edible_Base.EEDelete(), Edible_Base.UpdateVaporParticle(), EffectArea.EEDelete(), EffectParticle.Stop(), ExplosivesBase.DestroyParticle(), FireplaceBase.StopParticle(), FireworksLauncherClientEvent.OnExplode(), FlammableBase.OnWorkStop(), FlammableBase.StopAllParticles(), FlammableBase.UpdateParticle(), FlareSimulation.~FlareSimulation(), FlareSimulation.OnActivation(), FryingPan.ParticleCookingStop(), HotSpringTrigger.EEDelete(), ItemBase.KillAllOverheatingParticles(), ItemBase.UpdateAllOverheatingParticles(), Misc_TirePile_Burning_DE.EEDelete(), ParticleTest.EEDelete(), PlayerBase.SetContaminatedEffectEx(), Roadflare.DestroyParticle(), SmokeSimulation.~SmokeSimulation(), and VolcanicTrigger.EEDelete()void SetSource(int particle_id)Sets particle id
particle_idintParticle ID registered in ParticleList to start playing
int GetParticleID()Gets particle id
Returns: int The last set Particle ID registered in ParticleList
Object GetDirectParticleEffect()Returns direct particle effect entity which is usually handled by this class 'Particle' if there is one
Returns: Object The Object with the particle component or null
Object GetParticleParent()bool HasActiveParticle()Returns if there is any particle active
Returns: bool Whether there is any particle active
int GetParticleCount()Returns the total count of active particles in all emitors
Returns: int Total count of active particles
bool IsRepeat()Returns whether there is a repeating particle
Returns: bool whether there is a repeating particle
float GetMaxLifetime()Returns the approx. max lifetime
Returns: float The largest lifetime sum among the emitors
protected void UpdateState()Creates/Destroys ParticleEffect child according to current state
Show 1 more
, m_ParticleEffectprivate void CreateParticleEffect()Creates ParticleEffect child, called from UpdateState
Show 15 more
, GetMaxLifetime(), GetObject(), ParticleList.GetParticleFullPath(), CGame.IsMultiplayer(), IsRepeat(), CGame.IsServer(), ReleaseObject(), IEntity.SetObject(), m_ForceOrientationRelativeToWorld, ParticleBase.m_IsPlaying, m_IsRepeat, m_Lifetime, m_ParticleEffect, m_ParticleID, and vector.Zeroprivate void DestroyParticleEffect()Destroys ParticleEffect child, called from UpdateState
OnFrame update event decrementing the stored approx. lifetime and checking for deletion
void OnCheckAutoDelete()Creates ParticleEffect child, called from UpdateState
private void OnToDelete()Called before deletion from OnCheckAutoDelete
void AddAsChild(Object parent, vector local_pos = "0 0 0", vector local_ori = "0 0 0", bool force_rotation_to_world = false)Attaches this particle onto some object. If null value is provided then the particle will be detached from the current parent.
parentObjectParent onto which this particle will be attachedlocal_posvectorAttachment position local to the parent (optional)local_orivectorOrientation local to the parent (Pitch, Yawn, Roll in degrees) (Optional)force_rotation_to_worldboolForce rotation to be in WS (Optional)
Set the value of a parameter of all emitors in the particle
parameterintThe parameter to apply the new value to (enum EmitorParam)valuefloatThe value to apply
Set the value of a parameter of an emitor in the particle
emitterintThe emitter to apply the new value to, -1 for all emitterparameterintThe parameter to apply the new value to (enum EmitorParam)valuefloatThe value to apply
Show 11 more
, EffectBoatWaterBack.Update(), EffectBoatWaterBase.EnableEmitor(), EffectBoatWaterFront.Update(), EffectBoatWaterSide.Update(), FireplaceBase.ParticleNormalSmokeStart(), FireplaceBase.ParticleSmallSmokeStart(), FlareSimulation.Simulate(), FlareSimulation.TurnOffDistantLight(), DestroyParticleEffect(), PlayerBase.ContaminatedParticleAdjustment(), and PlayerBase.SetContaminatedEffectEx()Get the value of a parameter of an emitor in the particle
emitterintThe emitor to get the value fromparameterintThe parameter to get the value from (enum EmitorParam)valuefloatThe value
Get the value of a parameter of an emitor in the particle
emitterintThe emitor to get the value fromparameterintThe parameter to get the value from (enum EmitorParam)
Returns: float The value
Show 1 more
, EffectBoatWaterSide.Update()Scales the given parameter on all emitors relatively to their ORIGINAL value.
parameter_idintThe parameter to adjust (enum EmitorParam)coeffloatThe multiplier to apply
Show 1 more
, m_ParticleEffectScales the given parameter on all emitors relatively to their CURRENT value.
parameter_idintThe parameter to adjust (enum EmitorParam)coeffloatThe multiplier to apply
Show 1 more
, m_ParticleEffectIncrements the value of the given parameter relatively from the ORIGINAL value.
parameter_idintThe parameter to adjust (enum EmitorParam)valuefloatThe value to sum
Show 1 more
, m_ParticleEffectIncrements the value of the given parameter relatively from the CURRENT value.
parameter_idintThe parameter to adjust (enum EmitorParam)valuefloatThe value to sum
Show 1 more
, m_ParticleEffectbool IsWiggling()Checks if particle is currently wiggling
Show 1 more
, ParticleSource.StopWiggle()Makes the particle change direction by random_angle every random_interval seconds.
random_anglefloatWill be the range [-random_angle, random_angle[ to wiggle betweenrandom_intervalfloatWill be the time range [0, random_interval] to wiggle next time
Show 5 more
, StopWiggle(), new Timer(), m_MaxOriInterval, m_MaxOriWiggle, and m_RandomizeOrivoid StopWiggle()Stops randomized wiggle
void RandomizeOrientation()Randomizes a new orientation and applies it
Show 8 more
, RandWiggleVector(), Timer.Run(), m_DefaultOri, m_DefaultPos, m_MaxOriInterval, m_ParentObject, m_RandomizeOri, and m_WiggleProcessingprotected vector RandWiggleVector()Helper to get a randomized wiggle vector
protected float RandWiggleFloat()Helper to get a randomized wiggle float value