home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_sy_r2talk.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
7KB
|
290 lines
# b_0PulleyJawa.cog
#
# CommuniCog for the Jawa in the Pulley Puzzle.
#
# Desc:
# Het talks, you know, like a jawa?
#
# 12/23/97 DGS Created.
#-----------------------------------------------------------------------------
symbols
message arrived
message blocked
message timer
message converse
message startup
message user1
message crossed
cog level_c
thing Gonk
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=3.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
int bye=0 local
int destframe=0 local
int ask=0 local
flex wait_time=1.3 local
end
code
startup:
hastalked = 0;
tonto = 1;
return;
timer:
movetoframe(elevator, 0, e_speed);
return;
arrived:
print("doug");
if (getsenderref() == elevator)
{
if (e_moving == 2)
{
call g_cont;
}
if (e_moving == 3)
{
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 4);
AISetMoveFrame(gonk, 4);
destframe = 4;
}
if (getcurframe(elevator) == 1)
{
settimer(10);
}
print("HEY HEY HEY");
e_moving = 0;
}
if (getsenderref() == gonk)
{
print("arrived at:");
printint(destframe);
if (destframe == 1)
{
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 2);
AISetMoveFrame(gonk, 2);
destframe = 2;
}
else if (destframe == 2)
{
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 4);
AISetMoveFrame(gonk, 4);
destframe = 4;
}
else if (destframe == 4)
{
e_moving = 1;
movetoframe(elevator,0, e_speed);
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 5);
AISetMoveFrame(gonk, 5);
destframe = 5;
}
else if (destframe == 5)
{
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 6);
AISetMoveFrame(gonk, 6);
destframe = 6;
}
else if (destframe == 6)
{
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 7);
AISetMoveFrame(gonk, 7);
destframe = 7;
}
else if (destframe == 7)
{
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 8);
AISetMoveFrame(gonk, 8);
destframe = 8;
}
else if (destframe == 8)
{
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 9);
AISetMoveFrame(gonk, 9);
destframe = 9;
}
else if (destframe == 9)
{
setthingmass(gonk, 100);
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 10);
AISetMoveFrame(gonk, 10);
destframe = 10;
}
else if (destframe == 10)
{
print("MASSSS!");
setthingmass(gonk, 0);
}
}
return;
g_cont:
print("whoo woooo");
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 3);
AISetMoveFrame(gonk, 3);
e_moving = 1; // Keep anything from triggering the elevator while gonk is moving onto it
destframe = 3;
return;
blocked:
print(blocked);
if (getsenderref() == elevator)
{
movetoframe(elevator,1,e_speed);
}
return;
crossed:
print("CROSSEDED");
if (e_moving == 0)
{
if ((getsenderref() == bottom_adjoin) && (getcurframe(elevator) == 0))
{
sleep(1);
movetoframe(elevator, 1, e_speed);
e_moving = 1;
}
else if ((getsenderref() == top_adjoin) && (getcurframe(elevator) == 1))
{
sleep(1);
movetoframe(elevator, 0, e_speed);
e_moving = 1;
settimer(0);
}
}
return;
converse:
// What response did the player select?
ResponseID = dwGetPlayerResponse();
print("converse");
if ((ResponseID == 0) && (!ConversationActive) &&(destframe == 0))
{
ConversationActive = 1;
playsong(0, 0, 0);
dwfreezeplayer();
ResponseID = 1;
}
if (ResponseID == 1) #beginning Node
{
//+++++++++++++++++++++++++++++++++++++++++++++++ Greetings setup
if (met == 0) // If they haven't met.
{
//dwSetDialogText("R2C000"); // Jawwa: Hello
dwplaycharacterspeech("R2C000","M1R2001.wav");
met = 2; // Tell him to say "anything else?"
}
else if (met == 1)
{
//dwSetDialogText("R2C001"); // Jawa: Hello again
dwplaycharacterspeech("R2C001","M1R2002.wav");
met = 2; // Tell him to say "anything else?"
}
else if (met == 2)
{
dwplayplayerresponse();
//dwSetDialogText("R2C002"); // Aynthing else?
dwplaycharacterspeech("R2C002","M1R2002.wav");
}
//+++++++++++++++++++++++++++++++++++++++++++++++ END Greetings setup
if ((global7 == 0) && (ask == 0)) dwAddResponse(100, "R2P100","T6xx001.wav",71); //droid: I need your help
else if ((global7 != 0) && (ask == 0)) dwAddResponse(100, "R2P120","T6xx010.wav",72); //droid: Can you jump on the lever?
//dwAddResponse(100, "R2P100"); //droid: Can you help me get the Jawa out of that trap?
dwAddResponse(300, "R2P400","",20); //droid: Gotta go.
}
if (ResponseID == 100) //
{
ask = 1;
print("tonto");
printint(tonto);
dwplayplayerresponse();
if (global8 == 0) dwplaycharacterspeech("R2C100","M1R2004.wav"); // r2: I'm not going out there when that assassin droid etc...
if (global8 == 1)
{
tonto = 1;
if (global7 == 0) dwplaycharacterspeech("R2C110","M1R2007.wav");// r2: What can I do? Come back when you have a plan...
if (global7 == 1) dwplaycharacterspeech("R2C120","M1R2009.wav"); // r2: Cut the other wire, then we'll talk....
if (global7 == 2)
{
tonto = 400;
dwplaycharacterspeech("R2C130","M1R2010.wav");
//dwSetDialogText("R2C130"); // r2: I'll help you out.
}
}
dwAddResponse(tonto,"R2P001","T1xx014.wav",60); // Droid: Thanks. (send it back to the root node)
}
if (ResponseID == 300) // # bye
{
ask = 0;
dwplayplayerresponse();
//dwSetDialogText("R2C300"); //first goodbye
met = 1; //Reset the greeting so he'll say "Hello again" instead of "anything else?"
dwcleardialog();
ShuffleTracks(6, 7, 8, 9);
ConversationActive = 0;
// Enable the player
dwunfreezeplayer();
}
if (ResponseID == 400) // # bye
{
dwplayplayerresponse();
dwUnfreezeplayer();
//ClearActorFlags(GetLocalPlayerThing(), 0x200000);
dwcleardialog();
ConversationActive = 0;
ShuffleTracks(6, 7, 8, 9);
ask = 0;
AISetMoveSpeed(gonk, g_speed);
AISetLookFrame(gonk, 1);
AISetMoveFrame(gonk, 1);
destframe = 1;
}
return;
gonkhelpsout:
return;
end