Aller au contenu

Photo

Control Door Lock Status?


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
AmstradHero

AmstradHero
  • Members
  • 1 239 messages
I want to control whether a door is locked or not locked via script.

However, I don't seem to be able to find any functions that will allow me to do this - the only ones I can see are GetPlaceablePickLockLevel or UT_OpenDoor. Obviously neither of these are particularly helpful.

My aim is to keep a player inside a certain area until he/she has completed a certain task. Now, while I could simply set doors to be non-interactive, that isn't a particularly intuitive option, and there's no simple way to point out to the player when the door becomes interactive.

#2
Trylane

Trylane
  • Members
  • 183 messages
http://social.biowar...tPlaceableState

http://social.biowar...gory:Placeables

http://social.biowar.../Placeables.xls

That's where I'd start. :) 

#3
Mengtzu

Mengtzu
  • Members
  • 258 messages
I used a trigger to lock the door behind the PC for the final boss fight of my module. This was the script I used in full:


#include "wrappers_h"
#include "events_h"

void main() {


event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);

switch(nEventType)
{
case EVENT_TYPE_ENTER:
{

object oDoor = GetObjectByTag("alpha_last_door");
SetPlaceableState(oDoor, PLC_STATE_DOOR_LOCKED);
DestroyObject(OBJECT_SELF);

break;
}

}
HandleEvent(ev, RESOURCE_SCRIPT_TRIGGER_CORE);



}

Modifié par Mengtzu, 29 décembre 2009 - 01:17 .


#4
AmstradHero

AmstradHero
  • Members
  • 1 239 messages
Thank you very much. Obviously I must still be getting used to the differences between NWN2 and DAO! :-P