How do I Handle Audio with a Platformer

Get help using Construct 2

Post » Mon Mar 30, 2015 12:43 pm

I've been working on a simple platformer for almost 3 weeks now and I'm ready to handle my audio input for the game.

In my game I have a start screen that plays Audio1.
After they click Level1, Audio2 plays for the rest of the game until...
They reach select levels 9-10 then Audio3 plays.
At the end of the game Audio4 plays.
If the player chooses to return to the start menu, Audio1 plays again.

However, with the handling of layouts I don't know if Construct2 is able to handle these conditions.

On The Start of Layout
-Layout is Equal To
--Then Run Condition for Audio Loop

On The Start of Layout
-Layout is Equal To
-Audio is Not Playing
--Then Run Condition for Audio Loop

Any help is appreciated!
B
4
Posts: 6
Reputation: 212

Post » Mon Mar 30, 2015 6:10 pm

on start of layout (add another condition) > system > compare two values > LayoutName = "your_layout_name"
*** audio > play > select your audio, set it looping, give it a tag (BGM for example)

on start of layout (add another condition) > system > compare two values > LayoutName = "your_layout_name"
(add another condition) > audio > is tag playing > "your_tag_name"
*** audio > play
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
60
S
14
G
2
Posts: 285
Reputation: 6,494

Post » Wed Apr 08, 2015 1:18 pm

That worked perfectly puntodamar.
Thank you!
B
4
Posts: 6
Reputation: 212

Post » Wed Apr 08, 2015 2:07 pm

you're welcome.
goodluck with your game!
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
60
S
14
G
2
Posts: 285
Reputation: 6,494


Return to How do I....?

Who is online

Users browsing this forum: ilyaTyl and 14 guests