home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_dx_bigdroid.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
5KB
|
179 lines
# Droids Cog Script
#
# D0_skyway.cog
#
# Skyways cog
#
#
#
#
#
# [MT]
#
#
# (C) 1997 LucasLearningLimited. All Rights Reserved
symbols
thing elevdoor1 linkid=1
thing elevdoor2 linkid=1
thing camera2 linkid=4 local
flex speed1=1.0
flex speed2=1.0
flex speed3=1.0
flex speed4=1.0
flex speed5=1.0
flex sleeptime1=0.0
flex sleeptime2=0.0
flex sleeptime3=0.0
flex sleeptime4=0.0
flex sleeptime5=0.0
message startup
message arrived
message pulse
message timer
message user0
thing teledest
thing camera2
surface conv1
surface conv2
surface conv3
surface conv4
vector Cvector
cog deploycog
thing ghost6 linkid=4
thing ghost7 linkid=4
thing ghost8 linkid=4
thing ghost9 linkid=4
int camint local
sound conveyorloop
sound conveyorstop
sound elevsound
end
## Code Section
code
user0:
player=getlocalplayerthing();
print("this is a big droid");
convloop=playsoundthing(conveyorloop, getsurfacecenter(conv1), .75, 2, 3, 0x1);
teleportthing(player, teledest);
anim1=slidewall(conv1, Cvector, 2.0);
anim2=slidewall(conv2, Cvector, 2.0);
anim3=slidewall(conv3, Cvector, 2.0);
anim4=slidewall(conv4, Cvector, 2.0);
setpulse(0.1);
camrand=rand();
if (camrand < 0.25) {
print("path6");
camint=2;
camera2=ghost6;
speed1=1.0;
speed2=1.5;
sleeptime1=2.0;
}
else if (camrand < .5) {
print("path7");
camint=3;
camera2=ghost6;
speed1=1.0;
speed2=1.0;
speed3=2.0;
sleeptime1=3.0;
sleeptime2=1.15;
}
else if (camrand < .75) {
print("path8");
camint=4;
camera2=ghost8;
speed1=1.0;
speed2=1.0;
}
else {
print("path9");
camint=5;
camera2=ghost9;
speed1=1.0;
speed2=1.0;
speed3=1.0;
}
setcamerafocii(2, player, camera2);
setcurrentcamera(2);
movetoframe(camera2, 1, speed1);
settimer(2);
return;
timer:
if (getsenderid()==1) {
sendmessage(deploycog, user1);
}
else if (getsenderid()==2) {
movetoframe(camera2, 2, speed2);
}
else if (getsenderid()==3) {
movetoframe(camera2, 3, speed3);
}
else if (getsenderid()==4) {
movetoframe(camera2, 4, speed4);
}
else if (getsenderid()==5) {
movetoframe(camera2, 5, speed5);
}
else {
movetoframe(elevdoor1, 1, 1);
movetoframe(elevdoor2, 1, 1);
playsoundthing(elevsound, elevdoor1, 1.0, -1, -1, 0);
}
return;
arrived:
curframe=getcurframe(camera2);
if (curframe==1) {
if (sleeptime1!=0) settimerEX(sleeptime1, 2, 0, 0);
else movetoframe(camera2, 2, speed2);
}
if (curframe==2) {
if (sleeptime2!=0) settimerEX(sleeptime2, 3, 0, 0);
else movetoframe(camera2, 3, speed3);
}
if (curframe==3) {
if (sleeptime3!=0) settimerEX(sleeptime3, 4, 0, 0);
else movetoframe(camera2, 4, speed4);
}
if (curframe==4) {
if (sleeptime4!=0) settimerEX(sleeptime4, 5, 0, 0);
else movetoframe(camera2, 5, speed5);
}
return;
pulse:
playerY=vectory(getthingpos(player));
if (playerY>0.485) {
stopanim(anim1);
stopanim(anim2);
stopanim(anim3);
stopanim(anim4);
stopsound(convloop, 0.1);
playsoundlocal(conveyorstop, .75, 0.0, 0);
settimerEX(0.5, 1, 0,0);
setpulse(0);
}
return;
end