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...
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.
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.