CreateSound3D

From Onset Developer Wiki
Revision as of 10:04, 12 December 2019 by 28days (talk | contribs)
CreateSound3D

Type: Function
Context: Client
Introduced: v1.0

Description

Plays a local audio file or over http. Also supports playing .pls network streams. Sound is played in 3D world space.

Syntax

CreateSound3D(SoundFile, x, y, z, radius)

Parameters

  • SoundFile
    The path to the file to play. Or a HTTP network stream or file.
  • x
    Location X coordinate
  • y
    Location Y coordinate
  • z
    Location Z coordinate
  • radius
    The radius to where the sound will be heard from.

Return Value

  • Returns the sound identifier. Returns false on error. Once the playback has finished the sound identifier will be destroyed automatically.

Example

CreateSound3D("your audio file name", 0.0, 0.0, 0.0, 100.0)

See also