home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_cc_jawatalk.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
21KB
|
832 lines
# CC_JawaTalk.cog
#
# CommuniCog for the Jawa in the Crystal Cave Puzzle.
#
# Desc: + _----_
# ============================== . / _ _ \ .
# ABANDON HOPE ALL YE WHO ENTER. |/_\/_\|
# ============================== \ || /
# ??/??/98 DGS Created. . ++++ . .
# \__/ +
#-----------------------------------------------------------------------------
symbols
message arrived
message converse
message startup
message arrived
message timer
message arrived
cog crystal1_c
cog crystal2_c
cog crystal3_c
cog laser_c
thing gonk linkid=2
thing elevator linkid=1
surface top_adjoin
surface Bottom_adjoin
thing player local
flex e_speed=5.0 local
int Met=0 local
flex g_speed=2.0 local
int Joke=0 local
int spoken_1=0 local
int gears=0 local
int ConversationActive=0 local
int gonkcurframe=0 local
int ResponseID local
int e_moving=0 local
flex set = 0.00 local
int bye=0 local
int add_crystal=0 local
int destframe=0 local
int walkmode=0 local
int donttalk=0 local
flex wait_time=1.3 local
int MattTateishi=0 local
end
code
startup:
# The varaible Add_crystal is used to deturmine what crystal has been (or is going to be) placed by Gonk.
# If it's set to 0, that means none have been placed yet. If it's set to 3 then all 3 three crystals have been
# placed.
# HACK! 6/26/98
# This verb sets the availability of the crystals based on which missions
# the player has completed...
dwSetupCrystalInventory();
player=getlocalplayerthing();
walkmode = 1;
destframe = 1;
call goframe;
hastalked = 0;
return;
timer:
if (walkmode == 1)
{
if (destframe == 3)
{
walkmode = 2;
destframe = 1;
call goframe;
}
if (destframe == 5)
{
walkmode = 2;
destframe = 1;
call goframe;
}
}
else if (walkmode == 2)
{
if (destframe == 1)
{
walkmode = 1;
destframe = 1;
call goframe;
}
}
else if (walkmode == 10)
{
if (destframe == 16)
{
print("CREATE FIRST CRYSTAL");
sendmessage(crystal1_c,user0); //Create crystal
sendmessage(laser_c,user1); //tell the laser cog there's another crystal added
walkmode = 11;
destframe = 14;
call goframe;
}
}
else if (walkmode == 20)
{
if (destframe == 28)
{
print("CREATE SECOND CRYSTAL");
sendmessage(crystal2_c,user0);
sendmessage(laser_c,user1); //tell the laser cog there's another crystal added
walkmode = 21;
destframe = 26;
call goframe;
}
}
else if (walkmode == 30)
{
if (destframe == 38)
{
print("CREATE THIRD CRYSTAL");
sendmessage(crystal3_c,user0);
sendmessage(laser_c,user1); //tell the laser cog there's another crystal added
walkmode = 31;
destframe = 36;
call goframe;
}
}
return;
arrived:
// The variable walkmode is used to figure out what pat Gonk is on. When walkmode is e set to a single digit
// number, it means gonk is in an idle mode. If walkmode is set to a two digit number like 30 or 31, it means
// He's putting away a crystal. Here's the layout:
// walkmode Meaning
// 1 Idle busywork at front of building
// 2 Idle busywork at front of building
// 10 Going to place crystal 1 in north chamber
// 11 coming back from placing crystal 1
// 20 Going to place crystal 2 in east chamber
// 21 Coming back from placing crystal 2
// 30 Going to place crystal in South West chamber
// 31 Coming back from placing crystal 3
// The majority of this code is eccentally checking to see where Gonk is and moving him from frame to frame.
// Boring.
if ((getsenderref() == gonk) && (!ConversationActive))
{
//print("arrived at:");
//printint(destframe);
if (walkmode == 1)
{
setthingmass(gonk, 0); //change this one
if (destframe == 1)
{
set = (rand()*2);
//printflex(set);
if (set < 1) destframe = 2;
else destframe = 4;
call goframe;
}
else if (destframe == 2)
{
destframe = 3;
AISetLookFrame(gonk, destframe);
settimer(5);
}
else if (destframe == 4)
{
destframe = 5;
AISetLookFrame(gonk, destframe);
settimer(5);
}
}
else if (walkmode == 2)
{
setthingmass(gonk, 00);
if (destframe == 1)
{
destframe = 0;
call goframe;
}
else if (destframe == 0)
{
destframe = 1;
settimer(6);
}
}
else if (walkmode == 10) // Going to place first crystal.
{
setthingmass(gonk, 0);
if (destframe == 1)
{
destframe = 6;
call goframe;
}
else if (destframe == 6)
{
destframe = 7;
call goframe;
}
else if (destframe == 7)
{
destframe = 8;
call goframe;
}
else if (destframe == 8)
{
destframe = 9;
call goframe;
}
else if (destframe == 9)
{
destframe = 10;
call goframe;
}
else if (destframe == 10)
{
destframe = 11;
call goframe;
}
else if (destframe == 11)
{
destframe = 12;
call goframe;
}
else if (destframe == 12)
{
destframe = 13;
call goframe;
}
else if (destframe == 13)
{
destframe = 14;
call goframe;
}
else if (destframe == 14)
{
destframe = 15;
call goframe;
}
else if (destframe == 15)
{
destframe = 16;
AISetLookFrame(gonk, destframe);
settimer(1);
}
}
else if (walkmode == 11) // Going to place first crystal.
{
setthingmass(gonk, 0);
if (destframe == 14)
{
destframe = 13;
call goframe;
}
else if (destframe == 13)
{
destframe = 12;
call goframe;
}
else if (destframe == 12)
{
destframe = 11;
call goframe;
}
else if (destframe == 11)
{
destframe = 10;
call goframe;
}
else if (destframe == 10)
{
destframe = 9;
call goframe;
}
else if (destframe == 9)
{
destframe = 8;
call goframe;
}
else if (destframe == 8)
{
destframe = 7;
call goframe;
}
else if (destframe == 7)
{
destframe = 6;
call goframe;
}
else if (destframe == 6)
{
destframe = 1;
walkmode = 2;
donttalk = 0;
call goframe;
g_speed = 1.0;
}
}
else if (walkmode == 20) // Going to place first crystal.
{
setthingmass(gonk, 0);
if (destframe == 1)
{
destframe = 6;
call goframe;
}
else if (destframe == 6)
{
destframe = 7;
call goframe;
}
else if (destframe == 7)
{
destframe = 8;
call goframe;
}
else if (destframe == 8)
{
destframe = 17;
call goframe;
}
else if (destframe == 17)
{
destframe = 18;
call goframe;
}
else