Posted by Smo on January 17, 1998 at 12:20:57:
Guys, I have a 4x4lift....I tried to use the standard cog (00_elev_switch2.cog), changing the speed...still goes VERY slow. I extracted the cog and customized it...here it is....
# Jedi Knight Cog Script
#
# smo3_e1.cog
#
#Modified by Tim Smulders 1/13/98: Original cog is 00_elev_switch2.cog
#
#Changes: Changed the speed and wavs.
#
# This elevator will go up to its next frame and hold there. The elevator can be recalled to a floor by hitting the
# respective "Call" button.
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
symbols
message crossed
message activate
message arrived
surface lower_adjoin0 linkid=1
surface lower_adjoin1 linkid=1
surface lower_adjoin2 linkid=1
surface call0 linkid=1
surface call1 linkid=1
surface call2 linkid=1
surface call3 linkid=1
thing elevator desc=elevator_object
int curframe=0 Local
flex start_wait=0.25 desc=pause_before_moving_up
flex speed=10.0
sound wav0=beep1.wav
end
# ========================================================================================
code
activate: // If player presses button
if (GetWallCel(call0) == 1) return;
if (GetSenderId() != 1) return;
setwallcel(call0,1);
setwallcel(call1,1);
setwallcel(call2,1);
setwallcel(call3,1);
PlaySoundPos(wav0, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
curframe=getcurframe(elevator);
movetoframe(elevator, 1-curframe, speed);
stop;
# ........................................................................................
arrived:
setwallcel(call0,0);
setwallcel(call1,0);
setwallcel(call2,0);
setwallcel(call3,0);
PlaySoundPos(wav0, SurfaceCenter(GetSenderRef()), 1, -1, -1, 0);
stop;
# ........................................................................................
crossed: // If player crosses adjoin(s)
if (IsMoving(elevator)) return;
sleep(start_wait); // pause before moving up
curframe=getcurframe(elevator);
movetoframe(elevator, 1-curframe, speed);
stop;
end
but it does not want to change speed or give me the beep1.wav when the switch is hit. Everything else in it works fine. I looked at the original level where this lift is (baron2) and made sure all thing flags etc were the same. Anyway, any thoughts? I know it must be something simple....
Also, how can I make the elevator crush the player rather than just pushing him down and holding there. I looked at the elevator in Bespin Mining Station...not sure what was different.
Oh, also, I have a window looking out into space...the window has a sky flag, space texture. Without putting a forcefield in, how can I make it non passable, or reflective, or both...I tried all the flags...passable, non passable, mag sealed...etc...no go. I tried extruding the face and then taking the sky flag off (turning the new sector into all space). THen I added the flags, thinking maybe they don't work on sky surface..but no go. Guess I could have done something wrong though (like that never happens :-))
THanks for any help guys...and thanks for the info on the has collide box question.