home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_t1_objectives.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
3KB
|
115 lines
# Droids Cog Script
#
# D0_skyway.cog
#
# Goals for catapult
#
#
#
#
#
# [MT]
#
#
# (C) 1997 LucasLearningLimited. All Rights Reserved
symbols
message startup
message shutdown
message user3
mesage user4
message entered
message timer
sector finishsector
sector droidsafesector
thing Edroid
thing Rdroid
sound goalsound=00tAccomplish.wav local
end
## Code Section
code
startup:
gsj=0;
dankeschoen=0;
goodshot=0;
player=getlocalplayerthing();
playermass=getthingmass(player)/2.2;
if (getdifficulty()==0) {
if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1); //2:tractor tread
else SetInv(player, 2, 0);
if (playermass<=100) SetInv(player, 4, 1); //4:between 750, 1500 kg
else SetInv(player, 4, 0);
}
else if (getdifficulty()==1) {
if (dwCheckDroidCaps(8)!=0) SetInv(player, 2, 1); //2:biped
else SetInv(player, 2, 0);
if ((playermass>=125)&&(playermass<=175)) SetInv(player, 4, 1); //3:between 150, 250 kg
else SetInv(player, 4, 0);
}
else if (getdifficulty()==2) {
if (dwCheckDroidCaps(524288)!=0) SetInv(player, 2, 1); //3:tractor tread
else SetInv(player, 2, 0);
if ((playermass>750)&&(playermass<=2250)) SetInv(player, 4, 1); //4:between 750, 1500 kg
else SetInv(player, 4, 0);
if (dwCheckDroidCaps(1048576)!=0) SetInv(player, 7, 1);
}
return;
shutdown:
if ((getdifficulty()==0)||(getdifficulty()==1)||(getdifficulty()==2)) {
if (getthingsector(player)==finishsector) {
SetInv(player,6,1); //1:landed on pad
}
else SetInv(player,6,0);
}
return;
user3:
if (gsj==0) {
gsj=1;
print("good shot, janson!");
goodshot=1;
SetInv(player, 3, 1);
playsoundlocal(goalsound, 1.0, 0.0, 0);
}
return;
user4:
print("they're both safe!");
settimer(2);
return;
timer:
if (getthinghealth(Rdroid)>0) {
playsoundlocal(goalsound, 1.0, 0.0, 0);
setinv(player, 5, 1);
}
return;
entered:
if (dankeschoen==0) {
dankeschoen=1;
print("entered the goalsector");
SetInv(player, 1, 1);
playsoundlocal(goalsound, 1.0, 0.0, 0);
}
setthingvel(player, '0,-3.0,0');
return;
end