Noob Question but please help
WhAmm
Member Posts: 4
Hi everyone,
I am quite new (as you can probably tell) and I have been trying to make a soundboard just for fun.
Any way I am trying to make it so when you click an actor it will play a sound. I add the mouse click and play sound but it plays the sound no matter where I click. Could someone please tell me how to make it so when I click on the small box (the actor) it will play a sound.
Thank you
I am quite new (as you can probably tell) and I have been trying to make a soundboard just for fun.
Any way I am trying to make it so when you click an actor it will play a sound. I add the mouse click and play sound but it plays the sound no matter where I click. Could someone please tell me how to make it so when I click on the small box (the actor) it will play a sound.
Thank you
Comments
Hi, are you using a background image as well? Make sure that has no Rules in it. and in each of your actors you want to trigger sounds, put into each:
When mouse is down ----if you're not going to make this app for desktop, so just for mobile device, then use When Touch is pressed ---
Play Sound
You've probably got this already but my guess is its in the background actor as well... (which you don't want, as I say). Hope that sorts it for you.
And welcome to GSC and the Forums! :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I tried all that and it is still doing it the background (which is an actor has nothing on it)
and even if I delete everything else except the actor with the rules it still plays the sound no matter were you click on the page
hopefully i helped
Bilal
I must be doing somthing wrong even if I have no background image and all I do is put 1 actor down and have its rules as
When Mouse is down
Play sound
When I click the play button and test the app no matter were I click on the screen it will play the sound
When *All* conditions are valid
When Actor Receives Event *mouse position* is *inside*
When Actor Receives Event *touch is pressed*
Play Sound *whatever*
Hi @WhAmm
As @SlickZero said (which I forgot to mention): if you are making a game/app for the Mac desktop, then you would use "When mouse is down" and you'd also need "When actor receives event mouse position is inside" because you are basically saying, when a user clicks the mouse...anywhere on screen... then whatever happens.
To make it more clear, If you are making games/apps for devices, then you can use "when touch is pressed" instead/only, except where two actors are overlapping/covering, then you'll get both "when touch is pressed" rules happening.
So to summarise, if you're making for devices, and your actor is not overlapping any other actor with a touch rule in it, all you need in your actor is:
When touch is pressed
Play Sound
Hope that's cleared it a bit more for you.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
works great now