Initial upload
Initial upload
This commit is contained in:
45
_module/nss/ffx_fc_lever2.nss
Normal file
45
_module/nss/ffx_fc_lever2.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
//////
|
||||
// Force Effects: Bounce
|
||||
// Force Cage
|
||||
// Created by Solias (sorcerer@wnwn.net)
|
||||
// http://www.wnwn.net/
|
||||
//
|
||||
////
|
||||
// ffx_fc_level - Force Cage lever script
|
||||
//
|
||||
// this script allows a lever to control a force cage
|
||||
// note: this same script is now used to control any force group
|
||||
//
|
||||
|
||||
|
||||
#include "ffx_inc"
|
||||
|
||||
void main() {
|
||||
string group_tag = GetStringRight(GetTag(OBJECT_SELF), 2);
|
||||
|
||||
if(GetLocalInt(GetModule(), "ffx_group_active_" + group_tag) == 0) {
|
||||
ffx_activate_forcegroup(group_tag);
|
||||
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
||||
}
|
||||
|
||||
else {
|
||||
ffx_deactivate_forcegroup(group_tag);
|
||||
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
||||
}
|
||||
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetObjectByTag("real_drag_door");
|
||||
|
||||
SetLocked(oTarget, FALSE);
|
||||
|
||||
AssignCommand(oTarget, ActionOpenDoor(oTarget));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user