(AGK version: 108.14)
Submitted: 2013-07-02 02:29:01
//NOTE: For this example to work you will need to copy 'Playerhit.wav'
//to the media folder at the location where you are running this example.
//The file can be found in your [AGK Install Directory]/Projects/Basic/Examples/Games/SpaceShooter/media/space

Setvirtualresolution(640,480)
ResetTimer()

If fileok=1
    sound = LoadSound("Playerhit.wav")
    Repeat
        If GetSoundExists(1)
            Print ("Sound File Exists")
        EndIf
        Sync()
    Until Timer()>12
EndIf
End
(AGK version: 108.14)
Submitted: 2013-07-02 14:29:18
//NOTE: For this example to work you will need to copy 'Playerhit.wav'
//to the media folder at the location where you are running this example.
//The file can be found in your [AGK Install Directory]/Projects/Basic/Examples/Games/SpaceShooter/media/space

Setvirtualresolution(640,480)
ResetTimer()

//Check for required files in media folder
fileok=GetFileExists("Playerhit.wav")
If fileok<>1
    Repeat
        Print ("Playerhit.wav needs to be in your media folder")
        Sync()
    Until Timer()>5
EndIF

If fileok=1
    sound = LoadSound("Playerhit.wav")
    Repeat
        If GetSoundExists(1)
            Print ("Sound File Exists")
        EndIf
        Sync()
    Until Timer()>12
EndIf
End
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.