making stuff when i get internet lol
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.
After choosing it, you'll be shown with settings like this.
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 plays the audio file until the sensor is triggered.
Play End plays the audio file once when the sensor is triggered.
If you know what the above two does, then you must be knowing what Loop Stop and Loop End does.
This mechanism is used in many ways like when