Destroy Layer while playing a sound only once

Need help with any SMBX game-related issues? Ask your questions here.
LuziferSan
Goomba
Goomba
Posts: 3
Joined: Thu Apr 16, 2020 2:47 pm

Destroy Layer while playing a sound only once

Postby LuziferSan » Fri Apr 24, 2020 11:48 am

Hey guys,

so I want to destroy some blocks in my level once the players reaches a certain place. This is how it looks:


Image

Thing is, I also want it to make a sound. But since I have to place the trigger multiple times to make sure the player doesn't miss it,
the sound will play for every trigger touched, even if the layer itself is already invisible.

Does anyone know how I can make it so that the sound already plays once, when the layer actually disappears?
Last edited by LuziferSan on Fri Apr 24, 2020 11:51 am, edited 1 time in total.

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9491
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: Show Layer with sound

Postby Enjl » Fri Apr 24, 2020 11:50 am

You could place one trigger, place it half a screen further right on a layer that disappears in the event, and have it activate the event with the "Activate" trigger instead of the "Death" trigger. It will trigger its own hiding when it comes onscreen.

Cedur
Raccoon Mario
Raccoon Mario
Posts: 7073
Joined: Tue Jun 28, 2016 10:14 am
Flair: semi-retired user, only interested in post ranks
Pronouns: he/him

Re: Show Layer with sound

Postby Cedur » Fri Apr 24, 2020 11:52 am

shouldn't it also work with audio sources? just place them above the triggers, and make them all disappear at once?

LuziferSan
Goomba
Goomba
Posts: 3
Joined: Thu Apr 16, 2020 2:47 pm

Re: Destroy Layer while playing a sound only once

Postby LuziferSan » Fri Apr 24, 2020 11:54 am

Yep, I didn't think of having the triggers disappear once acitvated. I'm new, have mercy :D
But thanks a lot, it worked perfectly.


Return to “Help and Support”

Who is online

Users browsing this forum: No registered users and 1 guest