Click or drag to resize

Sound Class

A queueable sound.
Inheritance Hierarchy
SystemObject
  Mannequin.BindingsSound

Namespace:  Mannequin.Bindings
Assembly:  Collapse (in Collapse.exe) Version: 0.4.6.1290 (0.4.6.1290)
Syntax
C#
public class Sound

The Sound type exposes the following members.

Properties
  NameDescription
Public propertyid
The ID (location) of this Sound.
Top
Methods
  NameDescription
Public methodQueue
Queue the sound for playing.
Top
Examples
Play a sound when an Agent dies.
Mannequin:Import("Event")
Mannequin:Import("Content")

local mySound = nil

-- Content can't be loaded before ContentReady
Event.On("ContentReady", function()
    mySound = Content.GetSound("sfx/gunshot_9mm")
end)

Event.On("AgentDeath", function(deathinfo)
    mySound:Queue()
end)
See Also