FANDOM



//:: OnUse: Toggle Activate //:: lever1 //:: Copyright (c) 2009 by Ananta //::////////////////////////////////////////////// /*

   Simple script to open a door and toggle the placeable animation
   state for placeables that support Activate and
   DeActivate Animations with play sound of the lever
   Placeables are best set to be DeActivated by
   default with this script.

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

  • /

//::////////////////////////////////////////////// //:: Created By: Georg Zoeller //:: Created On: 2003-09-10 //::////////////////////////////////////////////// void main() {

   PlaySound("as_sw_lever1");
   // * note that nActive == 1 does  not necessarily mean the placeable is active
   // * that depends on the initial state of the object
   int nActive = GetLocalInt (OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE");
   // * Play Appropriate Animation
   if (!nActive)
   {
     ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
   }
   else
   {
     ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
   }
   // * Store New State
   SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",!nActive);

object oDoor = GetObjectByTag("DOOR_TAG");

	SetLocked(oDoor,FALSE);
	ActionOpenDoor(oDoor);

}

//:: OnUse: Toggle Activate //:: lever1 //:: Copyright (c) 2009 by Ananta //::////////////////////////////////////////////// /*

   Simple script to open a door and toggle the placeable animation
   state for placeables that support Activate and
   DeActivate Animations with play sound of the lever
   Placeables are best set to be DeActivated by
   default with this script.

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

  • /

//::////////////////////////////////////////////// //:: Created By: Georg Zoeller //:: Created On: 2003-09-10 //::////////////////////////////////////////////// void main() {

   PlaySound("as_sw_lever1");
   // * note that nActive == 1 does  not necessarily mean the placeable is active
   // * that depends on the initial state of the object
   int nActive = GetLocalInt (OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE");
   // * Play Appropriate Animation
   if (!nActive)
   {
     ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
   }
   else
   {
     ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
   }
   // * Store New State
   SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",!nActive);

object oDoor = GetObjectByTag("DOOR_TAG");

	SetLocked(oDoor,FALSE);
	ActionOpenDoor(oDoor);

}

//:: OnUse: Toggle Activate //:: lever1 //:: Copyright (c) 2009 by Ananta //::////////////////////////////////////////////// /*

   Simple script to open a door and toggle the placeable animation
   state for placeables that support Activate and
   DeActivate Animations with play sound of the lever
   Placeables are best set to be DeActivated by
   default with this script.

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

  • /

//::////////////////////////////////////////////// //:: Created By: Georg Zoeller //:: Created On: 2003-09-10 //::////////////////////////////////////////////// void main() {

   PlaySound("as_sw_lever1");
   // * note that nActive == 1 does  not necessarily mean the placeable is active
   // * that depends on the initial state of the object
   int nActive = GetLocalInt (OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE");
   // * Play Appropriate Animation
   if (!nActive)
   {
     ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
   }
   else
   {
     ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
   }
   // * Store New State
   SetLocalInt(OBJECT_SELF,"X2_L_PLC_ACTIVATED_STATE",!nActive);

object oDoor = GetObjectByTag("DOOR_TAG");

	SetLocked(oDoor,FALSE);
	ActionOpenDoor(oDoor);

}

Back Edit

Script Directory

All items (11)