Author Sticky: Post Working Scripts Here
VorpalBlade Posted: Thursday, 18 July 05:43AM
1. Name: Door Checker

2. What it does: Fix for the "initial state open" door bug. Opens doors that should have started open in the first case.

3. Notes: Put this in the "OnModuleLoad" event in Module properties. Use unique Tags for each door.

NWScript:
//::///////////////////////////////////////////////

//:: Door Checker

//:: doorchk_mod

//:: Copyright (c) 2001 Bioware Corp.

//:://////////////////////////////////////////////

/*

*/

//:://////////////////////////////////////////////

//:: Created By: VorpalBlade

//:: Created On: 7/17/02

//:://////////////////////////////////////////////

void main()

{

    object oDoor1 = GetObjectByTag("OpenDoor1");

    object oDoor2 = GetObjectByTag("OpenDoor2");

    if (GetIsObjectValid(oDoor1))

    {

        AssignCommand(oDoor1, ActionOpenDoor(oDoor1));

    }

// Next door

    if (GetIsObjectValid(oDoor2))

    {

        AssignCommand(oDoor2, ActionOpenDoor(oDoor2));

    }

// Add as many as you need

}