|
Re: background sound don`t stop
[Re: dtntr]
#258702
04/01/09 15:59
04/01/09 15:59
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
snd_stopall(4);
before level loading like sper said or stop jour loop white snd_stop(soundhandle);
"empty"
|
|
|
Re: background sound don`t stop
[Re: flits]
#258704
04/01/09 16:26
04/01/09 16:26
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Uh... another idea: how about snd_stop before level saving?
I understand you want it to keep playing the background music while loading a game, and just keep going with that music, not reload the last music. (That's how I interpreted your "NO." Correct me if I'm wrong)
So your problem is that the current sound gets saved, but it shouldn't. I searched the manual, and game_save does not say which part you need to deactivate in order to have it NOT save the sound. I guess that leaves you with 3 options: -stop the sound before saving, then it shouldn't load a sound when you call game_load. (not tested) -stop the sound before loading, then it'll play the sound that it was playing when saving the game (not tested) -try around with the game_save mode and see which one you need to deactivate if you DON'T want to save the sound. you could try a test level for that: loop a sound in main, then have a function that saves the game and one that loads it and use: game_save("test",1,SV_ALL-SV_VARS); Replace SV_VARS with the thing you don't wanna save. i'd try SV_VARS, SV_SYS, SV_VIEWS, SV_FUNCTIONS and SV_LEVEL first.
No idea if this works. Hope it helps though.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: background sound don`t stop
[Re: Espér]
#258712
04/01/09 17:23
04/01/09 17:23
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
How about this. If it doesnt make enough sense, post the whole function containing your "game_load". NOTE: This code must be in a separate function to your game_save, or the var temp_handle at least must be after the game_save. temp_handle MUST NOT exist at save_game time.
function game_loader()
{
/// whatever else before game_load
var temp_handle = your_currently_playing_background_sound_handle;
game_load("???",num); //your unchanged game_load command
snd_stop(temp_handle); //only do this if game_load was sucessful.
/// whatever else needs doing after game_load
}
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: background sound don`t stop
[Re: unknown_master]
#259991
04/08/09 13:32
04/08/09 13:32
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
or try var_nsave for the sound handle?
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
|