Problem with a door and a lever. - by Lady Rowena
Lady Rowena on 6/5/2013 at 22:58
I have a door which opens by frobbing a lever. I set the door as locked, to prevent the enemies to frob the lever from outside, (they can see me through a window) which is illogical. The door is frobbable.
The problem is that if I exit and I close the door behind me, I can't open it anymore. Which is also illogical, since it's meant to be unlocked after frobbing the lever.
I tried every kind of settings: TrigUnlock, Fnord Lock, inverter...no success. Obviously my settings are wrong, or in the wrong order.
Any help please? :sweat:
edit
Ooops, I forgot to say...I would like the door to return locked, if I return inside and I close the door by frobbing the lever again.
darthsLair on 6/5/2013 at 23:17
Quote Posted by Lady Rowena
I have a door which opens by frobbing a lever. I set the door as locked, to prevent the enemies to frob the lever from outside, (they can see me through a window) which is illogical. The door is frobbable.
The problem is that if I exit and I close the door behind me, I can't open it anymore. Which is also illogical, since it's meant to be unlocked after frobbing the lever.
I tried every kind of settings: TrigUnlock, Fnord Lock, inverter...no success. Obviously my settings are wrong, or in the wrong order.
Any help please? :sweat:
Have you tried linking the door to the lever with locklink? If you use a locklink they wont frob the lever on the other side of the wall.
Edit: Also, if you are using a window object, you can set AiUtility>Blocks Ai Vision>True
Lady Rowena on 7/5/2013 at 00:12
It doesn't work. :(
If I simlply link the door->lock-->lever, the door opens anyway.
If I add "locked" to the lever (as if it's a lockbox) the lever doesn't move anymore.
If I do the opposite: lever->lock->door the lever still doesn't move and the door opens anyway.
Quote Posted by darthsLair
Edit: Also, if you are using a window object, you can set AiUtility>Blocks Ai Vision>True
I want them to be able to see inside, it's more challenging. :ebil:
darthsLair on 7/5/2013 at 01:17
Quote Posted by Lady Rowena
It doesn't work. :(
If I simlply link the door->lock-->lever, the door opens anyway.
If I add "locked" to the lever (as if it's a lockbox) the lever doesn't move anymore.
If I do the opposite: lever->lock->door the lever still doesn't move and the door opens anyway.
I want them to be able to see inside, it's more challenging. :ebil:
Okay, I just set this up just for my own curiousness as well and it worked fine.
1.Door>Locked True with frob info default, so they can frob the door but it is still locked.
2.FnordLock:add to the scripts:TrigUnlock, since the fnord lock is a lock.
3.On the lever:JointState> AnimS On and Joint1AnimS Reverse
Link the lever to the fnordlock with a controldevice link.
Link the fnordlock to the door with a controldevice link.
Works like a charm everytime.
Lady Rowena on 7/5/2013 at 01:17
Solved it! :D I did a more accurate search and I found an old post by R Soul with the solution:
Door ----(Lock)----> FnordLock
Switch ----(CD)----> FnordLock
lever: JointsState: AnimS property to On
The only inconvenient is that the lever starts in the 'down' position. I will see what I can do about it.
Lady Rowena on 7/5/2013 at 01:21
Ahh darthsLair, we posted at the same time! :D
darthsLair on 7/5/2013 at 01:22
Quote Posted by Lady Rowena
Solved it! :D I did a more accurate search and I found an old post by R Soul with the solution:
Door ----(Lock)----> FnordLock
Switch ----(CD)----> FnordLock
lever: JointsState: AnimS property to On
The only inconvenient is that the lever starts in the 'down' position. I will see what I can do about it.
On your reversed lever. Just use the Base rotation to 180, then rotate Heading as preferred.
LarryG on 7/5/2013 at 01:24
The documentation for StdDoor says that "The lock is disregarded when the door opens any other way [than with FrobWorldEnd]." So opening it by having the lever send a TurnOn will never unlock the door ... unless ... have you tried adding the Lock script to the door? That might work. Or you could try using an NVRelayTrap to convert TurnOn to Lock and TurnOff to Unlock ...
Lady Rowena on 7/5/2013 at 01:44
It's so simple, but I didn't thought about it. :) BTW, TrigUnlock wasn't necessary.
Quote Posted by LarryG
The documentation for StdDoor says that "The lock is disregarded when the door opens any other way [than with FrobWorldEnd]." So opening it by having the lever send a TurnOn will never unlock the door ... unless ... have you tried adding the Lock script to the door? That might work. Or you could try using an NVRelayTrap to convert TurnOn to Lock and TurnOff to Unlock ...
Actually, the lever unlocks the door without adding anything.
As for the rest, all solved, thanks! :)
LarryG on 7/5/2013 at 02:33
The lever should only open/close the door, not unlock it, according to the documentation. But it does seem that you have it handled to your satisfaction.