I am trying to build a game. Here is the source, but the sounds doesn't sound when I press the keys.
can you help me?
here is your source.
#include "audio.au3"
#include "keyinput.au3"
#include "menusapi.au3"
#include "randomizer.au3"
#include "sapi.au3"
#include "file.au3"
#include "GUIConstants.au3"
$loop = $device.OpenSound("sounds\loop.wav", 1)
$loop.repeating = 1
GUICreate("rithm immitations version 3.0 by SB Soft")
GUISetState(@SW_Show)
;lets make this buggy thing
menu()
func menu()
$loop.play
$m1 = Create_audio_menu("rithm Immitations main menu", "start, credits, contact media, what basically happened to the game, exit")
Select
Case $m1 =1
$loop.stop
start()
Case $m1 =2
$loop.stop
credits()
Case $m1 =3
$loop.stop
contact()
Case $m1 =4
$loop.stop
gamething()
Case $m1 =5
$loop.stop
beep(400, 500)
speak("Thanks for playing, exiting program")
beep(400, 500)
exit
EndSelect
EndFunc
func start()
speak("this is the storyline. You were playing music at A bar, but the persons suddenly left you alone. Now you need to play for the owner to win money, at least you think so. Start?")
sleep(1000)
speak("now!")
While 1
;a loop
WEnd
HotKeySet("A", "a")
HotKeySet("B", "b")
HotKeySet("C", "c")
HotKeySet("D", "d")
HotKeySet("E", "e")
HotKeySet("F", "f")
HotKeySet("G", "G")
HotKeySet("H", "h")
HotKeySet("I", "i")
HotKeySet("J", "j")
HotKeySet("K", "k")
HotKeySet("L", "l")
HotKeySet("M", "m")
HotKeySet("N", "n")
HotKeySet("O", "o")
HotKeySet("P", "p")
HotKeySet("Q", "q")
HotKeySet("R", "r")
HotKeySet("S", "s")
HotKeySet("T", "t")
HotKeySet("U", "u")
HotKeySet("V", "v")
HotKeySet("W", "w")
HotKeySet("X", "x")
HotKeySet("Y", "y")
HotKeySet("Z", "z")
HotKeySet("ESCAPE", "backtomenu")
EndFunc
func credits()
beep(450, 550)
speak("rithm immitations credits. Thanks to brad, for suplying me with some of the sounds I used in this game. Thanks to bailee alger, amir, Yashua Valdez, Hassan, and bee for helping me in this game, giving me ideas, sounds, and motivation!")
menu()
EndFunc
func contact()
beep(500, 500)
speak("contact media. I still don't have a")
beep(400, 250)
speak("domain. Sorry for the bad word he he. well, so you can't hit me up in a webpage, unfortunately, because I have no money actually, and the few I have I am planning to use in other things. Anyways, you can hit me at")
beep(800, 600)
speak("Gmail. galapagos.miguel.angel at gmail.com")
beep(800, 600)
speak("Skype, raton.miguelito.glps")
beep(800, 600)
speak("Audiogames.net forum, the terminator. and well that's all guys. Bye bye.")
menu()
EndFunc
func gamething()
speak("bwhat basically happened to rithm immitations, is a complete reconstruction or rewrite. Maybe the old version is better because this one is still progressing, while not in progress or beta or something like that. And well, it's all that happened to the game. thanks for entering in this menu choice.")
menu()
EndFunc
func backtomenu()
speak("quitting...")
menu()
EndFunc
func a()
SoundPlay("sounds\a.wav")
EndFunc
func b()
SoundPlay("sounds\b.wav")
EndFunc
func c()
SoundPlay("sounds\c.wav")
EndFunc
func d()
SoundPlay("sounds\d.wav")
EndFunc
func e()
SoundPlay("sounds\e.wav")
EndFunc
func f()
SoundPlay("sounds\f.wav")
EndFunc
func g()
SoundPlay("sounds\g.wav")
EndFunc
func h()
SoundPlay("sounds\h.wav")
EndFunc
func i()
SoundPlay("sounds\i.wav")
EndFunc
func j()
SoundPlay("sounds\j.wav")
EndFunc
func k()
SoundPlay("sounds\k.wav")
EndFunc
func l()
SoundPlay("sounds\l.wav")
EndFunc
func m()
SoundPlay("sounds\m.wav")
EndFunc
func n()
SoundPlay("sounds\n.wav")
EndFunc
func o()
SoundPlay("sounds\o.wav")
EndFunc
func p()
SoundPlay("sounds\p.wav")
EndFunc
func q()
SoundPlay("sounds\q.wav")
EndFunc
func r()
SoundPlay("sounds\r.wav")
EndFunc
func t()
SoundPlay("sounds\t.wav")
EndFunc
func u()
SoundPlay("sounds\u.wav")
EndFunc
func v()
SoundPlay("sounds\v.wav")
EndFunc
func w()
SoundPlay("sounds\w.wav")
EndFunc
func x()
SoundPlay("sounds\x.wav")
EndFunc
func y()
SoundPlay("sounds\y.wav")
EndFunc
func z()
SoundPlay("sounds\z.wav")
EndFunc
:D