{{tag>dragonscript behavior gameworld}}
[[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[dragengine:modules:dragonscript:abstractions|Abstraction Layers: How you want to build your Game]] >> [[dragengine:modules:dragonscript:behavior_elements|Behavior Elements]] >> **GWBehaviorOneShotSpeaker**
====== 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 #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1DefaultGWBehavior.html,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 ======
#@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1GWBehaviorOneShotSpeaker.html,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.