k double post put what the heck
//this is the part of the script looking after the left door
left_door
{
// run this when the door is opened
trigger open
{
// the script may be in the wait section already and so close too early this will stop and force the script to restart
halt
//set the left door to open
gotomarker (the open postion marker name)
//make the script wait before closing the door, here we have 3 secodns
wait 3000
//close the doors again
gotomarker (the closed position marker name)
}
}
//the same script but this time for the right door
right_door
{
// run this when the door is opened
trigger open
{
// the script may be in the wait section already and so close too early this will stop and force the script to restart
halt
//set the right door to open
gotomarker (the open postion marker name)
//make the script wait before closing the door, here we have 3 secodns
wait 3000
//close the doors again
gotomarker (the closed position marker name)
}
}
here is a more complex version that has a variable controling if the door is locked or not
//this is the part of the script looking after the left door
left_door
{
// run this when the door is opened
trigger open
{
//this will only run the script if the door is open
accum 1 abort_if_greater_than 0
// the script may be in the wait section already and so close too early this will stop and force the script to restart
halt
//set the left door to open
gotomarker (the open postion marker name)
//make the script wait before closing the door, here we have 3 secodns
wait 3000
//close the doors again
gotomarker (the closed position marker name)
}
//lock the door
trigger lock
{
//set the variable use to check to see if door is locked to the locked position
accum 1 set 1
//set the doors to close stright away when lock is activated
gotomarker (the closed position marker name)
}
//open the door
trigger open
{
//set the variable use to check to see if door is locked to the open position
accum 1 set 0
}
}
//the same script but this time for the right door
right_door
{
//this will only run the script if the door is open
accum 1 abort_if_greater_than 0
// run this when the door is opened
trigger open
{
// the script may be in the wait section already and so close too early this will stop and force the script to restart
halt
//set the right door to open
gotomarker (the open postion marker name)
//make the script wait before closing the door, here we have 3 secodns
wait 3000
//close the doors again
gotomarker (the closed position marker name)
}
//lock the door
trigger lock
{
//set the variable use to check to see if door is locked to the locked position
accum 1 set 1
//set the doors to close stright away when lock is activated
gotomarker (the closed position marker name)
}
//open the door
trigger open
{
//set the variable use to check to see if door is locked to the open position
accum 1 set 0
}
}
if you read you will see that there are three main areas of the script that you must target from your mat for it to work effectively
the open, to open the doors
the lock, to stop the doors opening
the open, to re open the doors when locked
there are bound to be errors in an untested script and if anyone can see them plz post