CActionFactorySound

From PopcornFX
Jump to: navigation, search

CActionFactorySound.med.png - Main page : Particle layers Particle layers


The sound layer allows you to specify a sound that should be played in the effect.

Like any other layers, it can be triggered by any particle event.
You can use this to trigger a sound when some particle collides with the world, or to play an explosion sound when a fireworks rocket explodes and triggers the fireworks explosion layer, etc...


CActionFactorySound.med.png Node properties

Field name Default value Description
CActionFactorySound.png Action
Delay 0 Delay in seconds before emission start.
RandomDelay 0 in the [0,1] range. Random coefficient to apply to the delay.

The final delay is computed as: Delay * (1 + rand(-1,1) * RandomDelay)
Basically, when 'RandomDelay' is 0.0, the real delay will be equal to 'Delay'.
When 'RandomDelay' is 1.0, the real delay will take a random value between '0' and 'Delay * 2'
When 'RandomDelay' is 0.5, the real delay will take a random value between 'Delay * 0.5' and 'Delay * 1.5'. etc...

Weight 1.0 When the layer is inside a folder that has a child evaluation mode set to 'random', tells the spawn probability of that layer. Higher values compared to other childs will mean that layer will have more chance to be spawned
CActionFactorySound.png General
ChannelGroup <empty>
SoundPath <empty> Path to the sound thay should be played
Volume 0.5 In the [0,1] range. Sound volume.
TimeWindow_Start 0 Time in seconds into the sound-clip at which playback should start. 0 means the start of the sound.
TimeWindow_Duration 0 Time in seconds during which the sound-clip should be played. 0 means the whole length of the sound.
EventStart <empty> Useful if your engine uses [Wwise] for audio
EventStop <empty> Useful if your engine uses [Wwise] for audio
UserData 0 integer value, not used by the editor. Can be used to send custom information about the sound to your game-engine.
CActionFactorySound.png Localization
Position {0, 0, 0} Fetches an attribute and uses it as a flux coefficient.
Layout CActionFactorySound.png