User Tools

Site Tools


dragengine:modules:dragonscript:gwbehavior_oneshotspeaker

GWBehaviorOneShotSpeaker

Game world behavior adding support for one-shot speakers. One-shot speakers are deploy-and-forget speakers. They play a sound or a synthesizer once and remove themselves when they have finished playing.

The layer mask used for all one-shot speakers is set by default to BaseGameApp.WorldLayerBit.audio.

One shot speakers are used internally by material sounds and by the play sound element behavior.

This behavior is added by default to DefaultGWBehavior.

Instance Counts

This behavior can be present only once in a game world.

Game World Properties

This behavior has no game world properties.

Events

This behavior sends no events.

Behavior Tree Actions

This behavior adds no behavior tree actions.

Behavior Tree Conditions

This behavior adds no behavior tree conditions.

State Machine Actions

This behavior adds no state machine actions.

State Machine Conditions

This behavior adds no state machine conditions.

State Machine Events

This behavior sends no state machine events.

Required Behaviors

This behavior requires no other behaviors.

Optional Behaviors

This behavior has no optional behaviors.

API Documentation

GWBehaviorOneShotSpeaker.

Since DragonScript Module Version 1.17

Use Cases

  • Play impact, footstep or explosion sounds at a position without creating a behavior element.
  • Play a synthesizer based effect once at a position and let it clean up automatically.
You could leave a comment if you were logged in.
dragengine/modules/dragonscript/gwbehavior_oneshotspeaker.txt · Last modified: by dragonlord