Fixed Gaurds, Replaced/Added Maps
fixed all the gaurds i found, they correctly say guards now. Exchanged and added high road maps.
This commit is contained in:
34
_module/nss/door_prvswitch.nss
Normal file
34
_module/nss/door_prvswitch.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//Lock a door with a lever - main script
|
||||
|
||||
void main()
|
||||
{
|
||||
string sTag = GetTag(OBJECT_SELF);
|
||||
sTag = GetStringLeft(sTag, GetStringLength(sTag) - 2) + "dr";
|
||||
object oDoor = GetNearestObjectByTag(sTag);
|
||||
|
||||
|
||||
if ( GetLocalInt( OBJECT_SELF, "m_bActivated" ) == TRUE )
|
||||
{
|
||||
SetLocalInt( OBJECT_SELF, "m_bActivated", FALSE );
|
||||
PlayAnimation( ANIMATION_PLACEABLE_DEACTIVATE );
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLocalInt( OBJECT_SELF, "m_bActivated", TRUE );
|
||||
PlayAnimation( ANIMATION_PLACEABLE_ACTIVATE );
|
||||
}
|
||||
|
||||
|
||||
if (GetLocked(oDoor) == TRUE)
|
||||
{
|
||||
SetLocked(oDoor, FALSE);
|
||||
SpeakString("The door has been unlocked.");
|
||||
DelayCommand(1.0, ActionOpenDoor (oDoor));
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionCloseDoor(oDoor);
|
||||
DelayCommand(2.5, SetLocked(oDoor, TRUE));
|
||||
DelayCommand(3.0, ActionSpeakString("The door is now locked"));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user