I'm using a script I found online for a drag-and-lock game. At the end of the game, if all the matches are complete, Director plays a "beep". I'd like to change that "beep" to a different sound (a "cheering" sound file in my cast).
Here is the script:
done = TRUE
repeat with i = 6 to 10
if (sprite i).loc <> sprite(sprite(i).pLockToSprite).loc then
done = FALSE
if done then beep()
I'm sure it's something relatively easy - I'm guessing some change to the "if done then beep()" line, but I'm not sure what exactly I would put there instead.
Thanks in advance!
Yes, it's rather simple. Here's what it might look like:
if done then sound(1).play(member("cheering"))
PERFECT! Thank youWorked on the first try
Here's another similar question... I created another simple game using this tutorial: http://www.communitymx.com/content/article.cfm?page=1&cid=A5FEE868A7385E7A
Where within that script could I insert some sort of playsound behavior so that the cheering plays when all of the matches have been found?