Change sound played after touching actor
DankStew
Member Posts: 36
Hey there fellow Game Salad users, I'll keep it quick and simple because everybody is prob. busy with every/anything iPad: how do you make an actor play a different sound when touched?
Ex. Touch the main actor to play sound 1,
Touch alt actor, then touch main actor to play sound 2
Any help would be greatly appreciated. Thank you.
Ex. Touch the main actor to play sound 1,
Touch alt actor, then touch main actor to play sound 2
Any help would be greatly appreciated. Thank you.
Comments
Let's say you have three:
So in the switch button have a rule that says
Rule -when touch is pressed
_ Rule- game.sound=1
change attribute game.sound to 2
_ Rule- game.sound=2
change attribute game.sound to 3
_ Rule- game.sound=3
change attribute game.sound to 1
In main actor
Rule When touch is pressed
_ Rule When game.sound=1
play sound1
_ Rule When game.sound=2
play sound2
_ Rule When game.sound=3
play sound3
Main: When actor recieves event, touch/and when attribute game.sound = 1
Play sound XXXXX
.........................................
When actor recieves event, touch/and when attribute game.sound = 2
Play sound YYYYY
Alt Actor: When touch is inside/ and when touch is released/and when game.sound = 1
Change game.sound to 2
..........................................
When touch is inside/ and when touch is released/and when game.sound = 2
Change game.sound to 1
This should work
~CTM
EDIT: Wow it took me so long to write this, 3 others posted! sorry!
Thanks scitunes and CowTechMan!