Jaysyn904 66a0a3e043 Initial commit
Initial commit.
2024-08-03 14:13:18 -04:00

17 lines
557 B
Plaintext

// Trigger OnEnter -- close and lock all doors in the area.
//:://////////////////////////////////////////////////////////////
#include "nw_i0_plot"
void main()
{ object oPC = GetEnteringObject();
if( !GetIsPC( oPC)) return;
int iNTH = 1;
object oDoor = GetNearestObject( OBJECT_TYPE_DOOR, oPC, iNTH);
while( GetIsObjectValid( oDoor))
{ AssignCommand( GetArea( oDoor), ActionCloseDoor( oDoor));
AssignCommand( GetArea( oDoor), ActionDoCommand( SetLocked( oDoor, TRUE)));
oDoor = GetNearestObject( OBJECT_TYPE_DOOR, oPC, ++iNTH);
}
}