Channel for music

Unidx2

  • Posts: 13
Can anybody explain how to use the channel for music...I really don't understand

JeffreyDriver

  • Posts: 1945
You can choose from 32 channels (0-31) or you can just play the music and let Stencyl choose the channel automatically.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

NickamonPoppytail

  • *
  • Posts: 1070
These channels can be used for playing different sounds at the same time, e.g. You may play one sound on channel 0 and another on channel 1 at the same time.
Upcoming Projects
Poppytail 5 and Pixeltail: Fifth and sixth main instalments in Poppytail series. A Game About Trimming Hedges: Final Version: An updated version of the original AGATH; also canon to the Poppytail series. Easter Fun 2: A sequel to the original Easter Fun. One Million: Last-one-standing style small project; also canon to the Poppytail series.. The Poppytales: Hand-drawn spin-off bullet-hell RPG using characters from all my other book and game projects. Not canon to the Poppytail series.

Unidx2

  • Posts: 13
Why when I put the block "(Play)(Sound) on channel (1) the sound doesn't come out.

JeffreyDriver

  • Posts: 1945
Can you post your code.

Also, have you followed the instructions? E.g. removed meta data etc.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

Unidx2

  • Posts: 13
Is this right??? what do you mean by instruction??
 

JeffreyDriver

  • Posts: 1945
When you create a sound you'll see a box on the bottom-right of the screen telling you details you need.

Also, your code isn't going to work properly as it's going to be performed multiple times per second when a button is down. You'd also need to stop the sound before triggering it again.

You'd be best approaching this with a custom event that triggers and stops the sound.

Another method that I've found works well for short looping sounds to have the sound loop continuously in the background, and just change the volume of it as needed.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk

Unidx2

  • Posts: 13
Can you show me the code...

decafpanda

  • Posts: 200
By look of this it seems like you want this sound to loop while this rocket is alive.  To simplify this sound code you could do

When created- loop 'rocket' on channel 1

When self is killed- stop sound on channel 1

This might work well unless you are doing something different with the sfx that I am not seeing. 

Unidx2

  • Posts: 13
what i'm doing is everytime this player moves, the sound will play

decafpanda

  • Posts: 200
Oh.  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.

Unidx2

  • Posts: 13
why is there no sound if i do the channel code

JeffreyDriver

  • Posts: 1945
Is there sound if you just use the 'loop sound' block?
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk


JeffreyDriver

  • Posts: 1945
Try using a higher channel, say 20.
Current Projects:
The Grand Grimoire Chronicles Episode 1 now on Kongregate!.
I always appreciate useful feedback. Thank you.
www.jeffreydriver.co.uk