Stencyl 3.4.0 is now out. Get it now!

Channel for music

Unidx2

  • Posts: 13
Nope still the same


JeffreyDriver

  • Posts: 1248
Do you already have lots of sounds playing? I can't see why it wouldn't work with the 'loop on channel' block. Can you post your current code? And export your game as .stencyl and post it here?

Unidx2

  • Posts: 13
Is this how you use it??

decafpanda

  • *
  • Posts: 170
You are still using the sound in an updating event.  That is your problem. 

You could do

 "when (name of key)  is pressed" loop rocket sound on channel one

"When (name of key) is released" stop sound on channel one

These are input events.  Make sure you take the sound code off your always event.

NickamonPoppytail

  • *
  • Posts: 325
Also, with your current code, this "Rocket" sound will continually repeat every time a key is down, meaning that the sound will loop and play over itself multiple times per second. Also, this will happen every time the player moves, with the sound continually playing over itself. Stencyl's normal frame rate is 60FPS (I think), so if the sound is looping over itself 60 times per second, this may be what's causing this issue.

JeffreyDriver

  • Posts: 1248
'Updating' events are called 100 times per second. "drawing' events are dependent on the frame rate. Typically 60fps, but it can drop to whatever the frame rate is.

Seeing your code, I guess that your sound  will be run  more often than not. In which case, I suggest my original idea where you loop the sound on the start of the scene and adjust the volume as needed. Remember to stop the sound when the scene ends/player dies.

Unidx2

  • Posts: 13
THANK YOU...It's working now