StartSound: Difference between revisions

From The Official Visionaire Studio: Adventure Game Engine Wiki
No edit summary
No edit summary
Line 20: Line 20:
Syntax:
Syntax:
<syntaxhighlight>
<syntaxhighlight>
startSound("filename")
startSound("filename", {flags=1, properties})
</syntaxhighlight>
</syntaxhighlight>


Line 43: Line 43:
<b><u>Flags</u></b>
<b><u>Flags</u></b>


none
<b>properties</b>
* volume: allows you to set volume level via an integer value
* balance: allows you to set the left/right audio balance via an integer value (-1000/0/1000)
* offset: allows you to start audio file from x time via an integer value (in ms)
* loop: allows you to declare if audio file should loop via a boolean value (true/false)


<b><u>Return</u></b>
<b><u>Return</u></b>

Revision as of 17:46, 8 March 2013

Command History

Available since v3.8


Allows you to play sound files; with optional property values!

Additional Info

Currently available properties:
  • volume (allows you to set volume level)
  • balance (allows you to set left/right balance)
  • offset (allows you to start audio file from x time; in ms)
  • loop (allows you to loop the audio file)


Syntax:

startSound("filename", {flags=1, properties})


Example 1: basic play audio file method

n/a

Example 2: ...

n/a


Arguments

filename: path
The path to the audio file to be played! ("path/filename.type")

Flags

properties

  • volume: allows you to set volume level via an integer value
  • balance: allows you to set the left/right audio balance via an integer value (-1000/0/1000)
  • offset: allows you to start audio file from x time via an integer value (in ms)
  • loop: allows you to declare if audio file should loop via a boolean value (true/false)

Return

visionaireObject
The visionaire object representing the active action!