Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //copy and paste code below in the init of Land_TransferSwitch_01_F (Transfer Switch)
- //change the DistanceToReach to how far you want the script to work
- DistanceToReach = 300;
- this addAction
- [
- "Turn Off",
- {
- params ["_target", "_caller", "_actionId", "_arguments"];
- {
- private _ticket = format ["LSS%1", _forEachIndex];
- [_x, "OFF"] remoteExec ["switchLight", 0, _ticket];
- } forEach nearestObjects [_caller, [], DistanceToReach];
- _target animateSource ["switchposition",1];
- _target animateSource ["light",0];
- _target setDamage 1;
- },
- [],
- 1.5,
- true,
- true,
- "",
- "alive _target",
- 3,
- false,
- "",
- ""
- ];
- this addAction
- [
- "Turn On",
- {
- params ["_target", "_caller", "_actionId", "_arguments"];
- {
- private _ticket = format ["LSS%1", _forEachIndex];
- [_x, "On"] remoteExec ["switchLight", 0, _ticket];
- } forEach nearestObjects [_caller, [], DistanceToReach];
- _target animateSource ["switchposition",-1];
- _target animateSource ["light",1];
- _target setDamage 0;
- },
- [],
- 1.5,
- true,
- true,
- "",
- "!alive _target",
- 3,
- false,
- "",
- ""
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement