home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_05_jpcrate2.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
1KB
|
69 lines
#standard type crate generation cog.
symbols
message startup
message arrived
message entered
thing crateG
thing teleport1
thing teleport2
template crateT
sector checksector linkid=1
sector startsector linkid=2
cog entrycog
end
## Code Section
code
startup:
player=getlocalplayerthing();
return;
createcrate:
newcrate=CreateThing(crateT, crateG);
CaptureThing(newcrate);
movetoframe(newcrate, 1, 5);
return;
arrived:
if (getcurframe(newcrate)==2) {
destroything(newcrate);
print("teleporting player out");
if (getthingsector(player)==checksector) teleportthing(player, teleport1);
else call createcrate;
}
else if (getcurframe(newcrate)==1) {
sendmessage(entrycog, user3);
sleep(4);
sendmessage(entrycog, user4);
movetoframe(newcrate, 2, 5);
}
return;
entered:
if (getsenderid()==2) {
call createcrate;
print("you're in the factory");
}
return;
end