Stencyl 3.4.0 is now out. Get it now!

Reloading sound error?

karichyanne

  • Posts: 4
Hey everyone!

I have an issue which I'm sure can be sorted very easily but as a beginner its something driving me round the bend!

The game is a vertical runner and there is background music of course. When the actor has 0 hpoints left it switches to a game over scene which is then set to switch to the game start scene on click.

When the game is taken back to the start scene and the game is played a second time the background music begins to become distorted.

Is this a testing error, or will this happen when the game is exported?

I will attach my logs incase this helps!

Thank you  :-* :-*

JeffreyDriver

  • Posts: 769
The sound is being triggered each time you enter the scene. Either stop the sound when leaving a scene or use a boolean to make it only gets triggered once if it's already playing.
Current Project - www.stencyl.com/game/play/36346 (Retro Redux Dogfight).
I always appreciate useful feedback. Thank you.

www.jeffreydriver.co.uk

karichyanne

  • Posts: 4
HEY,

This is a current even that I had for this game, It does stop the sound when i leave the scene to end game, how would I alter this to stop it being triggered twice?

thank you!

JeffreyDriver

  • Posts: 769
The problem is that it's in an 'always/when updating' event so it's being triggered 100 times per second. It should be put in a 'when creating' behaviour so that it's triggered at the start only once.
Current Project - www.stencyl.com/game/play/36346 (Retro Redux Dogfight).
I always appreciate useful feedback. Thank you.

www.jeffreydriver.co.uk