Time for action – implementing a jumping sound effect
The game file to import and load for this session is 5961_08_01.stencyl
.
Before we create the behavior to manage the sound effects, let's remove the redundant Game Over scene from the game (right-click on the scene's thumbnail in the Scenes panel and select Remove).
Download Stencyl Book Jump Effect from StencylForge and close the tabs for the jump sound effect and StencylForge.
Create a new scene behavior called
Sound Management
.Click on the Attach to Scene button, and select Level1.
Close the tab for Level1 to return to the Sound Management behavior.
Attach the behavior to all the other scenes in our game, including the Main Menu scene.
Close the tabs for all the open scenes and return to the Sound Management behavior.
Add a new custom event called
Jump SFX
and configure the event as shown in the following screenshot, ensuring to set the event's trigger name toJumpSFX
:Open the actor behavior named Jump and Run Movement, add a new keyboard...