I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: Hectorpaddy on June 24, 2013, 08:38:29 AM

Title: Making music not restart
Post by: Hectorpaddy on June 24, 2013, 08:38:29 AM
Hey guys, I was just wondering what I have to do to to make the music not resetting, because I can't really figure it out on my own.
Title: Re: Making music not restart
Post by: Sephalos on June 24, 2013, 08:57:13 AM
Hey guys, I was just wondering what I have to do to to make the music not resetting, because I can't really figure it out on my own.
What engine are you using?

If you're using Yuutu go in the room editor and right click the music object and click creation code. Then enter something similar to this:
if !sound_isplaying(song) { sound_loop(song); }

Then in the scripts folder and find killPlayer
Find and remove this line of code: sound_stop_all();
And change the line sound_play(sndOnDeath); to sound_play(sndDeath);
In the "world" object find the "Press-R" event and remove the line sound_stop_all();

Hope this helps
Title: Re: Making music not restart
Post by: Hectorpaddy on June 24, 2013, 01:02:01 PM
Thank you a lot, i suggested it have to change something in playerkill, I just didn't know what.
Title: Re: Making music not restart
Post by: lemonxreaper on June 25, 2013, 07:08:09 AM
dont you also have to go into the press R event in the player and remove the same line of code?
Title: Re: Making music not restart
Post by: Sephalos on June 25, 2013, 07:14:30 AM
dont you also have to go into the press R event in the player and remove the same line of code?
Oops, yeah I totally forgot.
I'll edit my post
Title: Re: Making music not restart
Post by: LoLGamer CCC on May 25, 2014, 12:31:51 PM
Not working. :atkCry:
Title: Re: Making music not restart
Post by: ChillingSpark on May 26, 2014, 07:00:15 AM
Not working. :atkCry:
Works fine for me
Title: Re: Making music not restart
Post by: klazen108 on May 26, 2014, 11:17:48 AM
Lolgamer, I recommend you start a new thread giving us the details of your problem, such as which engine you're using, changes you've made to the code, and what exactly is happening. That way, we can help fix your problem without cluttering other threads :atkHappy: