Hello,
I've wrote a simple script for a rotating door as the template script door01.wdl doesn't seem to work.
the door rotates fine but a as soon as I want to add interaction using c_scan function troubles arise. I've tried nearly everything and read every single post on doors on these forums and
did dozens of tutorials on it but they all won't work.
So now I've got this totaly stripped down script just to spot errors but after days of puzzling I'm quite stuck.
function operate() // scan nearby doors or switches for operating them
{
c_scan(camera.x,camera.pan,vector(800,800,1500),SCAN_ENTS);
}
function scan_event()
{
if (event_type == EVENT_SCAN)
{
my.skill3 = 1; // sets door movement flag to the move state
}
}
action rotating_door() // action for rotating door
{
my.emask |= ENABLE_SCAN;
my.ENABLE_SCAN = ON;
my.event = scan_event;
while(my.skill3==1) {
my.pan+=3;
wait(1);
}
}
in the main function I placed :
According to all I've read this should work...but it doesn't.
when I include the line :
my.emask |= ENABLE_SCAN;
it errors :
"parameter unknown emask parameter"
when I delete the line I can press the crtl key like crazy but nothing happens.
Can anyone help me out with this becoming frustrating battle for a simple door ?
Thanks in advance.