Deprecated: str_replace(): Passing null to parameter #1 ($search) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/vhosts/gamedevstudiogame.com/httpdocs/classes/client.php on line 124
Game dev studio

Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

newSoundData

Description

Register new sound data.

Arguments

1 table data

the sound data to register.

2 number sounds

the amount of sounds that can be played back at once.

Example

-- taken from game/sounds.lua


local data = {}
data.name = "place_object"
data.sound = {"sounds/construction/place_object1.ogg", "sounds/construction/place_object2.ogg"}
data.soundType = "static"
data.looping = false
data.volume = sounds.volume
data.volumeType = sound.VOLUME_TYPES.EFFECTS
data.playAlways = true

register.newSoundData(data)