Hey guys,
another quick question.
How do I randomly select a sound to play when a certain area of the menu is clicked?
I've got all the sounds, the area and all that, but the fact is, when I click, it doesn't delay the click so it plays multiple copies at once.
I want the player to be able to click once, then be forced to let go of the mouse button to be able to click that area again.
I've done this before, but not with the current situation of code I have.
I haven't really used the "rnd" command before so I'm going to need some help.
Here's the code:
if playingeaster=0
If MX > 800 and My > 600 And Mx < 1024 And My < 768
if rnd(7) = 1 and playingeaster=0
play sound EasterEgg1
playingeaster=1
endif
if rnd(7) = 2 and playingeaster=0
play sound EasterEgg2
playingeaster=1
endif
if rnd(7) = 3 and playingeaster=0
play sound EasterEgg3
playingeaster=1
endif
if rnd(7) = 4 and playingeaster=0
play sound EasterEgg4
playingeaster=1
endif
if rnd(7) = 5 and playingeaster=0
play sound Zombie1
playingeaster=1
endif
if rnd(7) = 6 and playingeaster=0
play sound Zombie2
playingeaster=1
endif
if rnd(7) = 7 and playingeaster=0
play sound Zombie3
playingeaster=1
endif
endif
playingeaster=0
endif