Initial upload
Initial upload.
This commit is contained in:
36
_module/nss/leverdoors.nss
Normal file
36
_module/nss/leverdoors.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
// Loop over the cell doors, and open/close them all
|
||||
// DoorNameBase: base name of the numbered doors.
|
||||
// Futt <futt@futt.org> 2002
|
||||
|
||||
void main()
|
||||
{
|
||||
int i;
|
||||
string DoorNameBase = "CellDoor";
|
||||
string DoorName;
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
||||
// if(GetLocalInt(OBJECT_SELF, "Open") == 0)
|
||||
// {
|
||||
// for(i=1;i<7;i=i+1) // 11 == 10 doors, change if more/less
|
||||
// {
|
||||
// DoorName = DoorNameBase + IntToString(i);
|
||||
// object oDoor = GetObjectByTag(DoorName);
|
||||
// AssignCommand(oDoor, ActionCloseDoor(oDoor));
|
||||
// }
|
||||
// SetLocalInt(OBJECT_SELF, "Open", 0);
|
||||
// ActionSpeakString("Doors are closed", TALKVOLUME_TALK);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
for(i=1;i<7;i=i+1) // 11 == 10 doors, change if more/less
|
||||
{
|
||||
DoorName = DoorNameBase + IntToString(i);
|
||||
object oDoor = GetObjectByTag(DoorName);
|
||||
AssignCommand(oDoor, ActionOpenDoor(oDoor));
|
||||
}
|
||||
// SetLocalInt(OBJECT_SELF, "Open", 1);
|
||||
// ActionSpeakString("Doors are open", TALKVOLUME_TALK);
|
||||
// DelayCommand(185.0, SetLocalInt(OBJECT_SELF, "Open", 0));
|
||||
|
||||
// }
|
||||
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
}
|
||||
Reference in New Issue
Block a user