What it does
PlayMusic makes something happen at once: it plays. It takes no arguments, and returns nothing. That is the first of 4 forms.
Syntax
1
PlayMusic()2
PlayMusic(musicID integer)3
PlayMusic(musicID integer, loop integer)4
PlayMusic(musicID integer, loop integer, startID integer, endID integer)Parameters
| Name | Type | In forms |
|---|---|---|
| musicID | integer | 2, 3, 4 |
| loop | integer | 3, 4 |
| startID | integer | 4 |
| endID | integer | 4 |
Every form returns
nothing
Example · generated
Form 1, the short one
PlayMusic()DO Sync()LOOPForm 4, with every argument
music = LoadMusic("assets/track.ogg")PlayMusic(music, 1, 1, 1)DO Sync()LOOPPlayMusic is called with values of the types its signature asks for. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.