46 lines
886 B
Plaintext
46 lines
886 B
Plaintext
//////
|
|
// 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));
|
|
|
|
}
|
|
|
|
|
|
|