it happens with two cogs. one plays the glass break sound, the other plays a tusekn raider sound. one is a costom wav, the other uses beep1.wav from res1hi.gob (or whatever that file is called)
symbols
message activated
message arrived
message startup
thing elev
model newelev=newelev.3do
model oldelev=newelev1.3do
flex speed = 1.0
sound activate=set_hi2.wav
sound arrived=beep1.wav
end
code
startup:
SetThingModel(elev, oldelev);
return;
activated:
PlaySoundPos(activate, GetThingPos(elev), 1, -1, -1, 0);
if (GetCurFrame(elev) == 0)
{
SetThingModel(elev, newelev);
movetoframe(elev, 1, speed);
}
else if (GetCurFrame(elev) == 1)
{
SetThingModel(elev, newelev);
movetoframe(elev, 0, speed);
}
return;
arrived:
PlaySoundPos(arrived, GetThingPos(elev), 1, -1, -1, 0);
SetThingModel(elev, oldelev);
return;
end
------------------
www.lastgreatwar.com