Jump to content

Home

Script/door qestion


brwarner

Recommended Posts

Hello,

I have a scenario were I want to have a dor you open, then later after a dialog the door closes and cannot be opne. How do i do this... I looked at all the door functions and could find none. I could swear that this happened somewere in kotor2 so there must be a way...

Link to comment
Share on other sites

Hello,

I have a scenario were I want to have a dor you open, then later after a dialog the door closes and cannot be opne. How do i do this... I looked at all the door functions and could find none. I could swear that this happened somewere in kotor2 so there must be a way...

 

Something like this should work, if you give the door a unique tag:

 

void main() {
   object oDoor = GetObjectByTag("TagOfTheDoor");
   AssignCommand(oDoor, ActionCloseDoor(oDoor));
   SetLocked(oDoor, TRUE);
}

 

Then you'll have to edit the door template and check the "Key required to unlock or lock" checkbox if you use KotorTool (or set the KeyRequired field to 1 if using a GFF editor). This will prevent the player from using their security skill to unlock it.

Link to comment
Share on other sites

  • 4 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...