Hi All,
I've been playing about with Snow Queen this week, trying out a new idea to improve the collision detection mostly, but I've also been tidying some of the SFX.
There are bits in the game where Dizzy plays music - when you use Sarlan's Bugle, or the snake charmers pipes for example. The samples for these tend to clash with the game music, so I'm trying to mute the music while the sample's played.
This should be easy right? You just use MusicStore(); MusicStop(); to turn the music off, then after the sample's been played MusicFade(0,2); MusicRestore(); to fade it back up.
But here's the thing. This is the code for the doorbell to the dwarves' storehouse, which works fine:
func ActionObject_471()
{
MusicStore();
MusicFade(2,0);
MusicStop();
WaitFrames(15);
SamplePlay(46);
Message0(2,2,"YOU RING THE DOORBELL.");
MessagePop();
Message0(1,1,"THE DOOR'S LOCKED ANDnTHERE'S NO ANSWER.");
MessagePop();
MusicFade(0,1);
MusicRestore();
idx = OpenDialogInventory();
if(idx!=-1) UseObject(idx);
}
Sarlan's Bugle also works fine. But here's the code for the snake charmer's pipes:
func UseObject_418(idx)
{
if(ObjGet(idx,O_ID)==115)
{
idx = ObjFind(410);
if(ObjGet(idx,O_STATUS)==1)
{
MusicStore();
MusicFade(2,0);
MusicStop();
WaitFrames(15);
SamplePlay(31);
Message0(3,2,"YOU PLAY A SWEET TUNEnAND THE ROPE BEGINS TOnTWITCH, BEFORE RISINGnMAGICALLY INTO THE AIR");
MessagePop();
MusicFade(0,1);
MusicRestore();
idx = BrushFind(517);
BrushSet(idx,B_DRAW,0);
idx = BrushFind(518);
BrushSet(idx,B_DRAW,0);
idx = BrushFind(548);
BrushSet(idx,B_DRAW,3);
idx = BrushFind(549);
BrushSet(idx,B_DRAW,3);
GameCommand(CMD_REFRESH);
WaitTime(5);
idx = BrushFind(517);
BrushSet(idx,B_DRAW,3);
idx = BrushFind(518);
BrushSet(idx,B_DRAW,3);
idx = BrushFind(548);
BrushSet(idx,B_DRAW,0);
idx = BrushFind(549);
BrushSet(idx,B_DRAW,0);
GameCommand(CMD_REFRESH);
}
else
{
idx = ObjFind(115);
DropObject(idx);
}
}
else
{
DropObject(idx);
}
}
But with this, the music doesn't come back. I can't see any difference between the code so far as the music is concerned. In fact I can't see anything whatever that could be wrong. Has anyone got any ideas??? {yolkfolk}:scratch: