Skip to content

class Sound3d (client-side)

Available since version: 0.1.2

This class represents 3d sound.

Constructor

string fileName

Parameters:

  • string fileName: the name of the WAV audio file.

Properties

float volume

Available since version: 0.1.10

Represents the sound 3d volume scale in range 0.0 to 1.0.


bool looping

Available since version: 0.1.10

Represents the sound 3d looping feature.


float playingTime (read-only)

Available since version: 0.1.10

Represents the sound 3d playing time in miliseconds.


float obstruction

Available since version: 0.1.2

Represents the sound 3d obstruction.


float radius

Available since version: 0.1.2

Represents the sound 3d radius.


float coneAngle

Available since version: 0.1.2

Represents the sound 3d cone angle in range 0.0 to 360.0.


float reverbLevel

Available since version: 0.1.2

Represents the sound 3d reverb level.


bool ambient

Available since version: 0.1.2

Represents the sound 3d ambient mode feature.


float pitchOffset

Available since version: 0.1.2

Represents the sound 3d pitch offset.


Methods

play

Available since version: 0.1.2

This method will play the 3d sound.

void play()

stop

Available since version: 0.1.10

This method will stop the 3d sound.

void stop()

isPlaying

Available since version: 0.1.10

This method is used to check whether the 3d sound is currently playing.

bool isPlaying()

Returns bool:

true if the 3d sound is currently playing, otherwise false.


setTargetVob

Available since version: 0.1.2

This method will set the target vob, from which position the 3d sound will be played.

void setTargetVob(Vob vob)

Parameters:

  • Vob vob: the vob object reference.

setTargetPlayer

Available since version: 0.1.2

This method will set the target player/npc, from which position the 3d sound will be played.

void setTargetPlayer(int playerid)

Parameters:

  • int playerid: the id of the target player.