5 - Playing Sounds

Getting a sound from the Internet

making stuff when i get internet lol

Playing it in the game

Open the logic editor, add a Mouse sensor. The default type of event that is set in the Mouse Event is Left Button. Then add a Sound actuator and choose the file you want to play.

Sound actuator asking to choose a file to play
Sound actuator asking to choose a file to play

After choosing it, you'll be shown with settings like this.

Sound actuator with settings
Sound actuator with settings

Run the game and you'll... wait. When you click with your left button, the audio plays for an instance. Like...for 0.5ms. To avoid that, choose the Play Mode from Play Stop to Play End. Now run the game and your sound play.

Play Stop

Play Stop plays the audio file until the sensor is triggered.

Play End

Play End plays the audio file once when the sensor is triggered.

Back to our stuff

If you know what the above two does, then you must be knowing what Loop Stop and Loop End does.

How this can be used

This mechanism is used in many ways like when