Just like the LEC elevator cog, where you step through an adjoin, and it goes down or up, but handles 4 frames.
DO NOT WANT.
This is the static archive of the Massassi Forums. The forums are
closed indefinitely. Thanks for all the memories!
You can also download
Super Old Archived Message Boards
from when Massassi first started.
"View" counts are as of the day the forums were archived, and will no longer increase.
# Jedi Knight Cog Script # # modified elevator cog # symbols message crossed surface lower_adjoin surface upper_adjoin thing elevator float wait=0.25 float speed=4.0 int ready=1 local end ## Code Section code crossed: if (IsThingMoving(elevator)) return; if ((GetCurFrame(elevator) != 0) || (GetCurFrame(elevator) != 3)) return; if (GetCurFrame(elevator) == 0) { ready=0; Sleep(wait); MoveToFrame(elevator, 1, speed); WaitForStop(elevator); MoveToFrame(elevator, 2, speed); WaitForStop(elevator); MoveToFrame(elevator, 3, speed); WaitForStop(elevator); } if ((GetCurFrame(elevator) == 3) && (ready == 1)) { Sleep(wait); MoveToFrame(elevator, 2, speed); WaitForStop(elevator); MoveToFrame(elevator, 1, speed); WaitForStop(elevator); MoveToFrame(elevator, 0, speed); WaitForStop(elevator); } ready=1; return; end
# Jedi Knight Cog Script # # modified elevator cog with call switches # symbols message crossed message activate surface lower_adjoin surface upper_adjoin surface lower_call linkid=1 surface upper_call linkid=2 thing elevator float wait=0.25 float speed=4.0 int ready=1 local sound beep=activate02.wav end ## Code Section code crossed: if (IsThingMoving(elevator)) return; if ((GetCurFrame(elevator) != 0) || (GetCurFrame(elevator) != 3)) return; if (GetCurFrame(elevator) == 0) { ready=0; Sleep(wait); MoveToFrame(elevator, 1, speed); WaitForStop(elevator); MoveToFrame(elevator, 2, speed); WaitForStop(elevator); MoveToFrame(elevator, 3, speed); WaitForStop(elevator); } if ((GetCurFrame(elevator) == 3) && (ready == 1)) { Sleep(wait); MoveToFrame(elevator, 2, speed); WaitForStop(elevator); MoveToFrame(elevator, 1, speed); WaitForStop(elevator); MoveToFrame(elevator, 0, speed); WaitForStop(elevator); } ready=1; return; activate: if (! IsThingMoving(elevator)) return; if ((GetCurFrame(elevator) != 0) || (GetCurFrame(elevator) != 3)) return; if ((GetSenderId()=1) && (GetWallCell(lower_call)=0)) { SetWallCell(lower_call,1); PlaySoundPos(beep, GetSurfaceCenter(lower_call), 1.0, -1, -1, 0); MoveToFrame(elevator, 1, speed); WaitForStop(elevator); MoveToFrame(elevator, 2, speed); WaitForStop(elevator); MoveToFrame(elevator, 3, speed); WaitForStop(elevator); SetWallCell(lower_call,0); } if ((GetSenderId()=2) && (GetWallCell(upper_call)=0)) { SetWallCell(upper_call,1); PlaySoundPos(beep, GetSurfaceCenter(upper_call), 1.0, -1, -1, 0); MoveToFrame(elevator, 2, speed); WaitForStop(elevator); MoveToFrame(elevator, 1, speed); WaitForStop(elevator); MoveToFrame(elevator, 0, speed); WaitForStop(elevator); SetWallCell(upper_call,0); } end