Hi!
I don't know what I'm doing wrong. Everything seems OK!
The r5ug won't stop when I say StopThing() and the uggy nor r5ug will play key when I say Ukey=PlayKey or Rkey=PlayKey!
HELP!
Oh, and could someone find me a perticular sound? A sound of metal screeching against metal, like a train hitting the breaks or a falling elevator hitting its breaks? Please?
/Edward
I don't know what I'm doing wrong. Everything seems OK!
Code:
# Fixing the elevator
#
# By Edward
symbols
message activated
thing r5ug
thing entercam
thing sideviewcam
thing incam
thing clampcam
thing clamp1left
thing clamp1right
thing clamp2left
thing clamp2right
thing uggy
thing lift
thing shaftcam
thing door
thing doorelev1
thing doorelev2
thing elevdown
thing x
thing officer
thing elevdowncam
surface pannel
surface skip
int skippit=0 local
sound thereyouare
sound pleep1
sound wevebeenwaiting
sound pleep2
sound fixthiselev
sound pleep3
sound idontcare
sound pleep4
sound openr5
sound u_oh
sound que
sound clamps
sound screem
sound ifthisisr5thenwho
sound thatsoundedlikeugnaut
sound screech
keyframe r5opentop
keyframe ugfix
keyframe woops
int Rkey=-1 local
int Ukey=-1 local
end
#
code
activated:
IF(GetSenderRef()==door)
{
SetActorFlags(GetLocalPlayerThing(),0x840000);
SetCurrentCamera(0);
SetCameraFocus(0,entercam);
SetCameraFocus(1,officer);
TeleportThing(r5ug,GetLocalPlayerThing());
TeleportThing(GetLocalPlayerThing(),x);
MoveToFrame(door,1,8);
if(skippit==0) WaitForStop(door);
AISetMovePos(r5ug,GetThingPos(doorelev1));
if(skippit==0) sleep(2);
StopThing(r5ug);
sleep(0.05);
SetCameraFocus(0,sideviewcam);
print("Officer: There you are!");
PlaySoundThing(thereyouare,officer,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(thereyouare));
MoveToFrame(door,0,8);
PlaySoundThing(pleep1,r5ug,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(pleep1));
print("Officer: We've been waiting for you!");
PlaySoundThing(wevebeenwaiting,officer,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(wevebeenwaiting));
PlaySoundThing(pleep2,r5ug,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(pleep2));
print("Officer: We need you to fix this elevator now!");
PlaySoundThing(fixthiselev,officer,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(fixthiselev));
PlaySoundThing(pleep3,r5ug,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(pleep3));
print("Officer: I don't care if you have a speech problem, fix this one first!");
PlaySoundThing(idontcare,officer,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(idontcare));
PlaySoundThing(pleep4,r5ug,1,-1,10,0xC0);
MoveToFrame(doorelev1,1,8);
AISetMovePos(r5ug,GetSurfaceCenter(pannel));
if(skippit==0) sleep(3);
SetCameraFocus(0,incam);
SetCameraFocus(1,r5ug);
MoveToFrame(doorelev1,0,8);
AISetLookPos(r5ug,GetSurfaceCenter(pannel));
if(skippit==0) sleep(1);
PlaySoundThing(openr5,r5ug,1,-1,10,0xC0);
Rkey=PlayKey(r5opentop,r5ug,1,0x004);
if(skippit==0) sleep(1);
TeleportThing(uggy,r5ug);
Ukey=PlayKey(ugfix,uggy,1,0x004);
if(skippit==0) sleep(10);
print("Officer: If that's the R59P, then... Who's fixing the elevator?");
PlaySoundThing(ifthisisr5thenwho,officer,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(ifthisisr5thenwho));
print("Uggy: U-oh...");
PlaySoundThing(u_oh,uggy,1,-1,10,0xC0);
if(skippit==0) sleep(GetSoundLen(u_oh));
StopKey(Ukey,uggy,1);
Ukey=PlayKey(woops,uggy,1,0x004);
if(skippit==0) sleep(1);
SetCameraFocus(0,clampcam);
SetCameraFocus(1,clamp1left);
if(skippit==0) sleep(1);
PlaySoundLocal(clamps,1,0,0xC0);
MoveToFrame(clamp1left,1,8);
MoveToFrame(clamp1right,1,8);
if(skippit==0) sleep(1);
PlaySoundLocal(clamps,1,0,0xC0);
MoveToFrame(clamp2left,1,8);
MoveToFrame(clamp2right,1,8);
if(skippit==0) sleep(1);
stopkey(Ukey,uggy,1);
SetCameraFocus(0,incam);
SetCameraFocus(1,incam);
PlaySoundLocal(que,1,0,0xC0);
if(skippit==0) sleep(1);
MoveToFrame(incam,1,10);
PlaySoundLocal(screem,1,0,0xC0);
if(skippit==0) sleep(GetSoundLen(screem));
SetCameraFocus(0,officer);
SetCameraFocus(1,officer);
PlaySoundLocal(thatsoundedlikeugnaut,1,0,0xC0);
print("Officer: Did you hear that? That sounded like an Ugnaut...");
if(skippit==0) sleep(GetSoundLen(thatsoundedlikeugnaut));
SetCameraFocus(0,shaftcam);
SetCameraFocus(1,lift);
StopThing(r5ug);
sleep(0.05);
TeleportThing(r5ug,elevdown);
MoveToFrame(lift,1,16);
PlaySoundThing(screech,lift,1,-1,25,0xC1);
if(skippit==0) WaitForStop(lift);
SetCameraFocus(0,elevdowncam);
SetCameraFocus(1,r5ug);
if(skippit==0) sleep(1);
MoveToFrame(doorelev2,1,8);
if(skippit==0) sleep(3);
AISetMovePos(r5ug,elevdowncam);
if(skippit==0) sleep(3);
MoveToFrame(doorelev2,0,8);
TeleportThing(GetLocalPlayerThing(),r5ug);
SetCameraFocus(0,GetLocalPlayerThing());
TeleportThing(r5ug,x);
SetCameraFocus(1,GetLocalPlayerThing());
ClearActorFlags(GetLocalPlayerThing(),0x840000);
}
else if(GetSenderRef()==skip)
{
print(">>>>>>>> Fast Fowarding >>>>>>>>");
skippit=1;
}
return;
endThe r5ug won't stop when I say StopThing() and the uggy nor r5ug will play key when I say Ukey=PlayKey or Rkey=PlayKey!
HELP!
Oh, and could someone find me a perticular sound? A sound of metal screeching against metal, like a train hitting the breaks or a falling elevator hitting its breaks? Please?
/Edward