Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - robotcousin

Pages: 1
Ask a Question / Run & Gun Demo - Putting in footsteps
« on: October 19, 2011, 05:07:03 pm »
Hi all,

It's my first time teaching game audio at a college from where I graduated. I've decided to use Stencyl for one of the lessons of replacing sounds in a game with better/custom ones, as well as adding in new instances where sounds can be played.

I'm sure we're all familiar with the Run and Gun demo game (it comes with Stencyl). Now, for the life of me, I simply can't seem to figure out how in the blazes to get the main actor's walk animation to successfully and properly (that part is important) play a ~2 second footstep file I have. The most I've gotten out of it is that it'll play the moment I press down both the left and right arrow keys. Sometimes, I've made it only play the file AFTER you've stopped walking. I think this was from me putting the 'stop' block when neither key is pressed, near the bottom of the main bit of code.

I do realize that I want all footstep sound instances to happen on channel 1, so I'm at least that far. I've attached an image (though it is the same code provided with Stencyl) to the "Run and Gun" Resource Pack, in the 'Walking' behaviour.

If anyone would be so kind as to point out (and explain why, if you like) where I should put my "Play/Loop sound" code block, as well as where to place the 'stop' block, I would GREATLY appreciate it. I'm close, I can feel it.

You'll notice that I already have placed them in the code, but that was just my latest 'best guess'.

EDIT: The screenshot didn't show that I currently have a floating 'stop' block which I'm obviously not using yet just to the right of all of this.

Pages: 1