Page 1 of 1

Placeable Door Animations and Locks

Posted: Mon Aug 11, 2008 4:58 am
by Gorgon
I'm missing something obvious probably, but I need an existing script for player housing to do something specific. I want to use one of the CEP doors (Custom > Placeables > Civilization Exterior > Doors > Large Wooden Door (any)), have it check for a key, unlock and play the open animation, then close and relock. No transition stuff. I have that covered.

CEP doors have the heartbeat crap with gateblocks, and I'm not touching that, and I also have the walking through it while closed covered. I can get it to unlock and open, but the last 2 steps don't work automatically. Even I can write a script to make it happen, but it is for player housing, so nothing like that.

Is there an existing script in NWN, or has someone made one for Avlis already that will do the trick? If it were a door, it would be easy. It is a placeable though.

*edits to add it is in the custom tab

Re: Placeable Door Animations and Locks

Posted: Mon Aug 11, 2008 5:15 am
by Moredo
There is a script for that on the servers, it's called autocloselock, and should be available with the other housing scripts.

Re: Placeable Door Animations and Locks

Posted: Mon Aug 11, 2008 5:22 am
by Gorgon
As I said, it is a placeable. It would have to go in the OnUsed slot, but that is needed to do the rest as well. If I could include it, that would work. It ignores OnOpen as far as I know (tried it).

Re: Placeable Door Animations and Locks

Posted: Mon Aug 11, 2008 5:26 am
by Moredo
Sorry, replying before I've had coffee. I can take a look at it when I get back from work, unless you've figured it out by then. :)

Re: Placeable Door Animations and Locks

Posted: Mon Aug 11, 2008 5:35 am
by Gorgon
The default door works great with the heartbeat script (evil). Take that out and that is where I run into problems.

Re: Placeable Door Animations and Locks

Posted: Mon Aug 11, 2008 5:43 am
by Sarmanos
Unfortunately, in my building experience, those placeable doors aren't good at all for being physical barriers. I've had the scripts on them and still you could walk through them with no problem at times despite the door's open/closed or unlocked/locked status.

Re: Placeable Door Animations and Locks

Posted: Mon Aug 11, 2008 5:47 am
by Gorgon
The door is just for looks really. The transition behind it also has a check for the key. This is just me wanting to update something IG and add the animations. If I have to, I can ignore the lock thing on the door itself, but I'm picky about realism.

Re: Placeable Door Animations and Locks

Posted: Tue Aug 12, 2008 12:10 am
by Gorgon
No luck without having to edit a script so far. Someone probably already made one to do this, but I can't check for it. I'm still looking for a way to do this, but for now I solved my problem a different way. I went with a regular door (lots to choose from now), used the autocloselock script in the OnOpen event and the jump_pc_2wp_xtra in the OnAreaTransitionClick event. The return transition is just a regular door one, but getting in needs the key to open the door, and checks again for it to use the transition itself. Fugly, but it works.

Like I said, I still want to find a way to use the placeable doors for this, but without adding the animation commands to a jump script (unless someone already did), I'm stuck on how to do it.

Re: Placeable Door Animations and Locks

Posted: Thu Aug 14, 2008 4:54 am
by CPU
I don't think what you want is available. Any of the CEP door placeables are going to work incorrectly with to the heartbeat script removal. The first time anyone goes to that placeable door, it will be physically transparent to the character allowing them to walk through it. Once opened, it will behave normally and naturally as it should.

There is a single door placeable (hidden door) used on the Privateers Enterprises ship. It has a modified script. It allows the hidden door placeable to accept a key and to only unlock with the required key. It then plays the appropriate open/close animations and locks afterwards. It's not a double door though, and will only work with the hidden door placeable. If you can modify what you're doing to a single door, let me know I'll hook you up with the proper script.