You are here

Delay close on placeable?

6 posts / 0 new
Last post
Arianna0
Delay close on placeable?

So I know I can use  x2_plc_used_opn to make a placeable  like the armoire so it will open and close on clicking it  without  opening a  inventory window.

Which is great . . .    but is there a way I can have these doors  auto close on their own after a period of time ? 

 

Reason being is the Armoire holds a ladder which leads to a lower escape route level [this is for a PC home]  and I would like the doors of the Armoire to be closed behind them

 

  • up
    50%
  • down
    50%
Vanya Mia

Haven't tried it, so no idea if the animations would work, but you could try co-opting the trapdoor script? That would give you your transition too.

"I took Skill Focus: Craft Disturbing Mental Image as my feat last level." Belkar, OOTS

  • up
    50%
  • down
    50%
Arianna0

I don't need it to go to a  transition as it does not go to a  'Door'  It goes to a ladder  which takes you to a WP   . . WHen the  armoire is opened there is a ladder that will take them down   . .  again   using a WP  that all works perfectly  . . .   was just hoping I could get the Armoire to close after them somehow

 

  • up
    0%
  • down
    100%
kevL's

if there's a script involved for using the ladder, could a line like this work:

//object oDoorToClose = OBJECT_SELF;
object oDoorToClose = GetObjectByTag("armoire_that_leads_to_ladder");
DelayCommand(10.f, AssignCommand(oDoorToClose, ActionPlayAnimation(ANIMATION_PLACEABLE_CLOSE)));



( sometimes ANIMATION_PLACEABLE_DEACTIVATE, etc. is used instead )

alternately, they could be rigged with a heartbeat that automatically shuts them every so often ...

edit: add another oDoorToClose def'n.

  • up
    50%
  • down
    50%
Vanya Mia

My intention was to use the trapdoor script as an example of how the animation command works in order to put into your own script, as in KevL's suggestion. I couldn't remember if they had constant or function changes for NWN2, but he's cleared that up now.

  • up
    50%
  • down
    50%
Arianna0

Thank you

  • up
    50%
  • down
    50%