Table of Contents

Sound Effect Class

Class For Sound Effect Interface

Return To Previous Page


World Class

Plays Sound Effect according to Position in the world

Class:apiName Return Description
World:playSoundEffectOnPos(pos: table, soundId: number, volume: number, pitch: number, isLoop: boolean) code: number Play a sound effect at the specified position
World:stopSoundEffectOnPos(pos: table, soundId: number) code: number Stop a sound effect at the specified position

Actor Class

Plays Sound Effect attached to Actor

Class:apiName Return Description
Actor:playSound(object:number, name:string, volume:number, pitch:number, flag:number) ErrorCode.OK Play sound
Actor:playSoundSpecial(object:number, name:string, type:number) ErrorCode.OK Play sound (specific type)
Actor:playSoundEffectById(object:number, soundId:number, volume:number, pitch:number, isLoop:bool) ErrorCode.OK Play sound effects on the specified Actor
Actor:stopSoundEffectById(object:number, soundId:number) ErrorCode.OK Stop the sound effect on the specified Actor

Player Class

Plays Sound Effect to Specific Player

Class:apiName Return Description
Player:playMusic(objid: number, musicId: number, volume: number, pitch: number, isLoop: bool) ErrorCode.OK Play background music to the player
Player:stopMusic(objid: number) ErrorCode.OK Stop playing the player's background music