Ok.. I have this cog that animates a key, and plays a sound while it does it. when the level first loads, it looks and sounds great. But if the player dies and starts over, the key still works, but the sound doesn't play. I tried changing the "startup" to "newplayer", but then neither the sound or the key works.
# ANIMAET TEH THINGS WITH KEYS
# MAED BY G00Nb0Y
# SI NOT MAED BY LUCASARTS SO DIE
symbols
int sndchannel=-1 local
thing animthing
keyframe key
flex vol
sound sound
message startup
end
code
startup:
if (sndchannel!=-1) sndchannel=-1;
sndchannel=PlaySoundThing(sound, animthing, vol, -1, -1, 0x80);
PlayKey(animthing, key, 1, 0x14);
end
[This message has been edited by Spiral (edited January 12, 2003).]
# ANIMAET TEH THINGS WITH KEYS
# MAED BY G00Nb0Y
# SI NOT MAED BY LUCASARTS SO DIE
symbols
int sndchannel=-1 local
thing animthing
keyframe key
flex vol
sound sound
message startup
end
code
startup:
if (sndchannel!=-1) sndchannel=-1;
sndchannel=PlaySoundThing(sound, animthing, vol, -1, -1, 0x80);
PlayKey(animthing, key, 1, 0x14);
end
[This message has been edited by Spiral (edited January 12, 2003).]