Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Script/door qestion

Page: 1 of 1
 brwarner
01-07-2006, 11:16 AM
#1
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...
 stoffe
01-07-2006, 1:30 PM
#2
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.
 jennypatel
09-07-2010, 5:06 AM
#3
If you want to open the door. Then you must give the appropriate function to the door and it will open and problem will be solved.
Page: 1 of 1