Choosing specific sound effect to play

spinnerbox

  • Posts: 166
I can develop all my cards to play specific sound using the events panel in each actor, but that is lot of duplicate work. Same blocks for each card only the sound is different.

My question is, can I create an actor behavior in which I can choose which specific sound to be played depending on which card was pressed with the mouse? I can identify which card was pressed, but how do I do that for sound? Is it possible?

For actor was like this: getActorTypeByName("ActorName");
Is there something similar for sound?

spinnerbox

  • Posts: 166
Turns out you can create  actor behaivor and add sound attribute which has default value "No sound".
Each time you add this behavior to specific actor, specific sound can be selected to be played from the behaviours dropdown list.

Looks like another question was answered by it's self :D

What are you planning on making buddy?
I'm 17 years old, here to help and Entertain. {Also to make fun games}
ADAM: (http://www.stencyl.com/game/play/25588)
Also, if you need help making a platformer, search {Jumper} in Stencyl Forge. This is a player with everything you need in it, that i made. Enjoy!


Will you enter it into the 2014 New Grounds Jam?
I'm 17 years old, here to help and Entertain. {Also to make fun games}
ADAM: (http://www.stencyl.com/game/play/25588)
Also, if you need help making a platformer, search {Jumper} in Stencyl Forge. This is a player with everything you need in it, that i made. Enjoy!


Good luck buddy!

I'm 17 years old, here to help and Entertain. {Also to make fun games}
ADAM: (http://www.stencyl.com/game/play/25588)
Also, if you need help making a platformer, search {Jumper} in Stencyl Forge. This is a player with everything you need in it, that i made. Enjoy!