Skip to content

CreateMapSound

Places a sound of the game’s - a crackling fire, a brook, a smithy’s loop - on the level, for every player.

The sound plays where it stands, heard as the game’s own sounds are (louder near it, through walls muffled); a looping trigger loops, a one-shot plays when the player’s game draws it.

CreateMapSound(trigger, x, y, z [, opts])
Parameter Type
trigger string the game’s audio trigger ("a_l_hot_wood_loop"): letters, digits, _ and .
x number metres
y number metres
z number metres; below 0 = on the ground
opts table CreateMapObject’s layer, group, persist, use (optional)

number - the sound’s id; nil and the reason

CreateMapSound("a_l_hot_wood_loop", 1288, 1098, -1, {layer = "camp"})

CreateMapEffect · CreateMapLight · the The server’s map group of the index