home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_d0_t4catapult.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
27KB
|
713 lines
# Droids Cog Script
#
# D0_skyway.cog
#
# Skyways cog
#
#
#
#
#
# [MT]
#
#
# (C) 1997 LucasLearningLimited. All Rights Reserved
symbols
message startup
message activate
message arrived
message pulse
message crossed
message entered
message timer
message user0 //Countdown is done
message user1 //Create fake crate
message user2 //Edroid is ready
message user3 //Rdroid is ready
message user4 //Droids are walking to catapult
message touched
message exited
surface adjustswitch linkid=2 //rotates the catapult
surface callsmallcrate linkid=4 //calls 50lb crate
surface callbigcrate linkid=5 //calls 100lb crate
surface destructionfloor0 mask=0xfff linkid=58
surface destructionfloor1 mask=0xfff linkid=18
surface destructionfloor2 mask=0xfff linkid=28
surface destructionfloor4 mask=0xfff linkid=38
surface destructionfloor5 mask=0xfff linkid=48
surface targetfloor3 mask=0xfff linkid=11
surface fakelever linkid=1 //launches the crate
surface add_sand linkid=10
surface rem_sand linkid=9
surface led_ones nolink
surface led_tens nolink
surface led_hund nolink
surface flbottom linkid=1
surface blink nolink
sector curplayersector
sector ipxsector mask=0xfff linkid=8
thing catapult
thing minecart linkid=3
thing catapult0
thing catapult1
thing catapult2
thing catapult3
thing catapult4
thing catapult5
thing crated
thing smallcrate local
thing player local
thing camera2
thing createcrateghost
thing Edroid linkid=13
thing Rdroid linkid=16
template Asmallcratetemplate
template Blargecratetemplate
//template Csmallcratetemplate
template Dlargecratetemplate
template Esmallcratetemplate
template Flargecratetemplate
cog countdowncog
cog callcratecog
cog Edroidcog
cog Rdroidcog
cog goalscog
//sound t1catadjloop
//sound t1catadjstop
sound t1catlaunch
sound t1caton
sound t1catreset
sound t1catwarmup
sound texplo01
flex md_power=10.0 local
flex c_dest=10.0 local
flex sand_inc=5.0 local
flex payloadweight local
flex playerweight local
flex timecount local
int callcrate=0 local
int crateisinworld=0 local
int movedyet=0 local
int launch=0 local
int cratev local
int step=10 local
vector catvel local
int channel22 local
sound clicksound
surface targetfloor4 mask=0xfff linkid=11
surface targetfloor5 mask=0xfff linkid=11
surface fakeadd_sand1 linkid=10
surface fakeadd_sand2 linkid=10
surface fakerem_sand1 linkid=9
surface fakerem_sand2 linkid=9
surface fakeadjustswitch linkid=2
sector badsector mask=0xfff linkid=8
template explosion_tpl=+grenade_exp local
vector pgwvector
thing teledest
surface CRMface linkid=2
sound switchsound=swt00ltswch1.wav
sound dave=mcht1ctrsetstp.wav
surface SugarSpunSister nolink
sound EdroidSetWAV=t1ed013.wav local
sound RdroidSetWAV=t1gk021.wav local
thing ghostcamera nolink
cog dcheckcog
end
## Code Section
code
startup:
playeronminecart=0;
print("startup");
launchinprogress=0;
player=getlocalplayerthing();
playerweight=getthingmass(player)/2.2;
attachthingtothing(minecart, catapult);
setwallcel(CRMface, 1);
callcrate=0;
launchisdeadly=0;
crateisinworld=0;
movedyet=0;
launch=0;
// timecount=0;
donotlaunch=0;
Rdroidready=0;
Edroidready=0;
if (getdifficulty()==0) {
md_power=10.0;
call displayweight;
smallcrateweight=50;
largecrateweight=100;
if ( (playerweight>=37.5)&&(playerweight<=75) ) fakeplayerweight=40;
else if ( (playerweight>=75)&&(playerweight<=122.5) ) fakeplayerweight=66;
else fakeplayerweight=playerweight;
teleportthing(Edroid, teledest);
teleportthing(Rdroid, teledest);
}
else if (getdifficulty()==1) {
md_power=10.0;
call displayweight;
smallcrateweight=70;
largecrateweight=150;
if ( (playerweight>=25)&&(playerweight<=75) ) fakeplayerweight=33;
else if ( (playerweight>=120)&&(playerweight<=175) ) fakeplayerweight=99;
else if ( (playerweight>=75)&&(playerweight<=120) ) fakeplayerweight=66;
else fakeplayerweight=playerweight;
teleportthing(Edroid, teledest);
teleportthing(Rdroid, teledest);
}
else if (getdifficulty()==2) {
md_power=50.0;
call displayweight;
smallcrateweight=1000;
largecrateweight=2000;
if ( (playerweight>=900)&&(playerweight<=1100) ) fakeplayerweight=660;
else if ( (playerweight>=1900)&&(playerweight<=2100) ) fakeplayerweight=1320;
else fakeplayerweight=playerweight;
}
setwallcel(blink, 0);
setpulse(1);
setadjoinflags(SugarSpunSister, 2); #you can now walk thru this adjoin
return;
entered:
if ( (getsourceref()==player)&&(getsenderref()==minecart) ) {
print("the player is on the minecart");
playeronminecart=1;
}
if (getdifficulty()==1) {
print("here we are at diff 1");
if (crateisinworld==0) return;
if (getsenderid()==8) {
if (getsourceref()==crate) {
print("the crate entered something");
if (getsenderref()==ipxsector) {
print("you did it!!!!");
sendmessage(goalscog, user3);
// setthingvel(crate, pgwvector);
}
else {
print("try again. entered the wrong sector");
call destroycrate;
}
}
}
}
else {
if ( (getsenderid()==8)&&(getsourceref()==crate) ) {
if (getsenderref()==ipxsector) {
print("you did it!!!! entered correct sector");
sendmessage(