This cog wont work:| why?
[This message has been edited by EH_AceCSF (edited February 03, 2003).]
Code:
# Jedi Knight Cog Script#
# CompDoor.COG
#
#
#
# EH_AceCSF
# This Cog is Not supported by LucasArts Entertainment Co
symbols
thing door nolink
thing fueltank nolink
thing camera desc=camera_door
thing camera1 desc=camera_wall
Thing wall linkid=2
surface switch linkid=1
sound activate
sound blow
message activated
message removed
message startup
flex delay=1.5 desc=delay
int old_camera local
int player local
int active=0 local
int status=0 local
end
# ========================================================================================
code
startup:
player=jkGetLocalPlayer();
activated:
if ((GetSenderId() == 1) && (active == 0))
{
PlaySoundLocal(activate, 1, 0, 0);
SetActorFlags(player, 0xa00000);
old_camera = GetCurrentCamera();
SetCurrentCamera(0);
SetCameraFocus(0, camera);
PlaySoundLocal(activated, 1, 0, 132);
sleep(1,0);
movetoframe(door, 1, 5);
Print("Stormtroops! i need to find other way..");
sleep(delay);
SetCameraFocus(0, camera1);
Print("hmm..");
sleep(delay);
ClearActorFlags(player, 0xa00000);
SetCameraFocus(0, player);
SetCurrentCamera(old_camera);
active = 1;
}
return;
removed:
if (GetSenderRef() != fueltank) Return;
{
PlaySoundLocal(blow, 1, 0, 0);
movetoframe(wall, 1, 5);
active = 2;
}
return;
end[This message has been edited by EH_AceCSF (edited February 03, 2003).]

![http://forums.massassi.net/html/eek.gif [http://forums.massassi.net/html/eek.gif]](http://forums.massassi.net/html/eek.gif)