Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Where and how would i add this code?
Dude i am super new lmao, i'm just making a maze game for my assignment. i didn't even know programming was a part of game maker until you mentioned it. how would i open the code i need
basically wherever you are causing a death to happen, you would make sure to stop the audio first.
Alternatively, at the start of your room - stop all existing audio
Okay so how do i actually do that. I pressed the button with "execute" on it and it just made a version of my game. i tried to edit it then with notepad++ but it was all encrypted. Am i on the right tracks or am i doing it completely wrong?
Okay i get it now, i entered the code you linked me. I changed the "waterfall" to "sound3". the "snd." remains which i'm not sure i should do or not. I run the game and i get an error. i hear the music but the screen is black.
near song is my background music and in the code it appears red. Is there anything else in the template i need to change?
Obviously you already have the music playing somehow - otherwise you wouldnt' be having a looping problem. Just put an "if" before that that if the music is already playing... stop it.
Couldn't get it to work but thanks for trying.
If you are and your game already plays the music properly the first time and your room is able to reset properly when you collide into walls then a fairly basic and simple solution would be to just stop the song from playing whenever you run into walls, but before the room is restarted.
So in your collision event with your walls just before the action you've placed to restart the room you could put an "execute code" action like BBX told you about. In that code you could put ...
The reason you're getting repeating overlayed songs is because you're always telling them to play, but never telling them to stop. So everytime you restart its creating a new intances of the song and playing it even though there is already one, or more, instances of the song already playing from the last time the room was being run.
Another fairly basic and simple solution would be to check if the song is already being played before playing it again. By using ...
In your situation though I'd think just stopping the song after the collision, but before restarting the room, would be the quickest and easiest method.
Okay i got it to work man, thank you so much! Only problem now is that i don't want the song to reset i just want it to continue wihtout overlapping however with all this effort i think i'll just leave it as it is. Thank you so much man i really appreciate the time you took to help me out <3
If you want it to not reset the song then instead of stopping the song before reseting the room you'll want to do that second thing I mentioned where you check if the song is playing already and only play it if it isn't already playing.
That should make you only have the song play once and not stop even if you reset the room. Be sure you have the audio set to loop though otherwise it won't restart the song when it reaches the end.