SoundPlayer
Plays its Sound when something happens, with no code: whenever its Message is sent (by a pickup, a switch, a counter, an enemy’s death message or Game.Send), and when it appears if OnStart is ticked. PitchVariation makes each play a little different, so a sound heard over and over doesn’t grate.
Properties
Section titled “Properties”Each is listed as its key in the scene file and the MCP tools, then its kind of value, its default and what it does.
sound: text = null. The sound to play, e.g. “Sounds/door.wav”. Make one with Audio > New Sound. (A sound in Assets, e.g. “Sounds/hit.wav”.) (Field: a sound.)message: text = null. The message that plays it, e.g. “Score”. Empty plays it only on start. (Names a message.) (Field: a name.)onStart: true or false = false. Plays it as soon as it appears: a scene’s opening sting, a spawned explosion. (Field: on or off.)volume: a number = 1. How loud, 0 to 1, on top of the player’s sound volume. (Field: a number.)pitch: a number = 1. 1 as recorded, 2 an octave up, 0.5 an octave down. (Field: a number.)pitchVariation: a number = 0. How far each play’s pitch wanders at random either way: 0.1 is up to a tenth higher or lower. (Field: a number.)positional: true or false = false. Heard from where it is (quieter off screen, from that side) rather than everywhere equally. (Field: on or off.)
Actions
Section titled “Actions”What anything can make it do with no code: a Trigger’s do when its message arrives, a Contraptions Wire’s input as its signal comes on, a script’s Game.Do(entity, “Name”).
Play. Plays its sound now.
Scripts use it as SoundPlayer: its methods, events and values that aren’t saved with the scene.