home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Fond 52
/
ClassicFond52.iso
/
GAMES
/
DROIDW.RAR
/
DWCD.GOB
/
mission_cog_00_elev_simple.cog
< prev
next >
Wrap
Text File
|
1998-11-04
|
1KB
|
56 lines
#
# Droids Cog Script
#
# 00_elev_simple.cog
#
# Basic elevator Cog
#
# Desc:
# This elevator will go up to frame one, sleep, then come back down to frame 0 when
# entered from the bottom. When entered from the top, it should stay at the bottom.
# Suspicisously like the std_elev in Jedi Knight.
#
#
# 11/03/97 [DGS] Created (sort of)
#
# --------------------------------------------------------------------------------
symbols
message crossed
message arrived
message timer
surface lower_adjoin0
surface lower_adjoin1
thing elevator
float start_wait=0.25
float sleeptime=2.0
float speed=4.0
end
## Code Section
code
crossed:
if (IsThingMoving(elevator)) return;
if (GetCurFrame(elevator) != 0) return;
Sleep(start_wait); // pause before moving up
MoveToFrame(elevator, 1, speed);
return;
arrived:
if (GetCurFrame(elevator) == 0) return;
SetTimer(sleeptime);
return;
timer:
MoveToFrame(elevator, 0, speed);
return;
end