home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_02_sneaky.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
7KB
|
221 lines
#-----------------------------------------------------------------------------
# Droidworks
# Sample cog for a simple conversation with Bob.
#-----------------------------------------------------------------------------
symbols
message converse
message startup
message arrived
message user0
// message activate
message user1
message user2
thing Gonk
thing player local
thing ghostcamera linkid=1
thing snapdoor linkid=1
cog callcratecog
int MetGonk=0 local
int ConversationActive=0 local
int gonkcurframe=0 local
int ResponseID local
flex wait_time=1.3 local
cog goalscog
end
code
startup:
ct=0;
setthinglight(Gonk, 1.0, 0);
setthinglight(snapdoor, 1.0, 0);
player=getlocalplayerthing();
talksafe=0;
return;
activate:
print("activate");
curframe=getcurframe(snapdoor);
movetoframe(snapdoor, 1-curframe, 1);
return;
user1:
talksafe=3;
call converse;
return;
user2:
talksafe=4;
return;
converse:
dwplayplayerresponse();
# What response did the player select?
ResponseID = dwGetPlayerResponse();
if (ResponseID == 0 && !ConversationActive) {
ConversationActive = 1;
PlaySong(0,0,0);
dwfreezeplayer();
ResponseID=1;
}
if (ResponseID==1) {
if (talksafe==0) return;
else if (talksafe==1) {
dwplaycharacterspeech("SFC000", "m2bd036.wav");
dwAddResponse(100, "SFP100", "m2xx021.wav", 70);
dwAddResponse(200, "SFP200", "m2xx022.wav", 71);
}
else if (talksafe==2) {
dwplaycharacterspeech("SFC001", "m2bd037.wav");
dwcleardialog();
ConversationActive=0;
ShuffleTracks(6,7,8,9);
dwunfreezeplayer();
}
else if (talksafe==3) {
dwplaycharacterspeech("SFC601", "m2bd056.wav" ); #back so soon?
dwAddResponse(9500, "SFP500", "m2xx025.wav", 71); #Can I have that crystal?
dwAddResponse(9600, "SFP600", "t8xx005.wav", 73); #How do I get outta here?
}
else if (talksafe==4) {
dwplaycharacterspeech("SFC420", "m2bd047.wav");
dwcleardialog();
ConversationActive=0;
ShuffleTracks(6,7,8,9);
dwunfreezeplayer();
}
}
else if (ResponseID == 100) {
dwplaycharacterspeech("SFC100", "m2bd038.wav");
dwAddResponse(200, "SFP200", "m2xx022.wav", 72);
}
else if (ResponseID == 200) {
dwplaycharacterspeech("SFC200", "m2bd039.wav");
dwAddResponse(210, "SFP210", "m2xx023.wav", 73);
}
else if (ResponseID == 210) {
dwplaycharacterspeech("SFC210", "m2bd041.wav");
dwAddResponse(300, "SFP300", "m2xx024.wav", 40);
}
else if (ResponseID == 300) {
dwplaycharacterspeech("SFC300", "m2bd044.wav");
dwAddResponse(220, "SFP400", "", 20);
}
else if (ResponseID == 9500) {
dwplaycharacterspeech("XFC400", "m2bd052.wav"); #I suppose you deserve...
sendmessage(goalscog, user1);
dwAddResponse(9501, "SFP501", "m2xx026.wav", 30); #Thanks, but no thanks!
}
else if (ResponseID == 9501) {
dwplaycharacterspeech("XFC500", "m2bd053.wav"); #Are you sure?
dwAddResponse(9400, "SFP400", "", 20); #good bye
}
else if (ResponseID == 9600) {
dwplaycharacterspeech("SFC501", "m2bd054.wav"); #mustyou go?
dwAddResponse(9500, "SFP601", "m2xx028.wav", 30);
}
else if (ResponseID == 9400) {
dwplaycharacterspeech("SFC600", "m2bd055.wav");
dwcleardialog();
ConversationActive=0;
dwplaycammyspeech(16015, "m2ca015.wav", 20, 2);
sleep(15);
dwendlevel();
}
else if (ResponseID == 220) {
dwplaycharacterspeech("SFC220", "m2bd043.wav");
dwcleardialog();
ConversationActive=0;
ShuffleTracks(6,7,8,9);
sendmessage(callcratecog, user1);
talksafe=2;
# Enable the player
dwunfreezeplayer();
call camtalk1;
}
return;
user0:
print("move dang it");
movetoframe(ghostcamera, 3, 5);
aisetmovespeed(gonk, .5);
AISetLookFrame(gonk, 1);
AISetMoveFrame(gonk, 1);
gonkcurframe=1;
return;
arrived:
if (getsenderid()!=1){
if (gonkcurframe==1) {
aisetmovespeed(gonk, .5);
AISetLookFrame(gonk, 2);
AISetMoveFrame(gonk, 2);
gonkcurframe=2;
}
else if (gonkcurframe==2) {
aisetmovespeed(gonk, .5);
AISetLookFrame(gonk, 3);
AISetMoveFrame(gonk, 3);
gonkcurframe=3;
}
else if (gonkcurframe==3) {
aisetmovespeed(gonk, .5);
AISetLookFrame(gonk, 4);
AISetMoveFrame(gonk, 4);
gonkcurframe=4;
}
else if (gonkcurframe==4) {
aisetmovespeed(gonk, .5);
AISetLookFrame(gonk, 5);
AISetMoveFrame(gonk, 5);
gonkcurframe=5;
}
else if (gonkcurframe==5) {
aisetmovespeed(gonk, .5);
AISetLookFrame(gonk, 6);
AISetMoveFrame(gonk, 6);
gonkcurframe=6;
}
else if (gonkcurframe==6) {
movetoframe(snapdoor, 1, 5);
sleep(2);
dwunfreezeplayer();
setCurrentCamera(7);
clearactorflags(player, 8);
talksafe=1;
}
}
return;
camtalk1:
if (ct1==0) {
dwplaycammyspeech(16014, "m2ca014.wav", 20, 2);
ct1=1;
}
return;
end