- Select manual -

Music

This example shows how to play a piece of music, stored as an .OGG file, with a sound component. The sound component is set to "looping" causing the music to never, ever stop.

music music.script

function init(self)
    msg.post("#music", "play_sound") 
end
  1. Send message to component “#music” telling it to play its sound.

If you want to play with these examples, you can get the project on Github.

Do you want to see more examples? Why not write a few yourself and submit a pull request? We love contributions.

Contribute