Priest.V 0 Posted May 9, 2018 yeah... issue is i needed something that is script based not mod based... @Nemanjic Share this post Link to post Share on other sites
cb65 86 Posted September 27, 2018 Hi everyone, I'm trying to add rotate satellite camera key functions to the PXS Satcom scripts. I've tried this so far highlighted in red but no success. key_function.sqf Spoiler private ["_event","_keyCode","_return"]; _event = _this; _keyCode = _event select 1; _return = true; switch (_keyCode) do { case 1://ESC { call PXS_fnc_CloseCamera; }; case 2://1 normal view { [2] call PXS_fnc_AdjustCamera; }; case 3://2 thermograph { [3] call PXS_fnc_AdjustCamera; }; case 4://3 white is hot { [4] call PXS_fnc_AdjustCamera; }; case 5://4 black is hot { [5] call PXS_fnc_AdjustCamera; }; case 50://M change default satellite position { call PXS_fnc_ChangePosition; }; default { _return = false; }; }; // key combo handling if (!(_return)) then { private["_pressedButtonArray"]; _pressedButtonArray = [_keyCode]; _return = true; // check for key actions switch (true) do { //case 17://W moves satellite camera forwards case (({_x in _pressedButtonArray} count (actionKeys "MoveForward")) > 0): { PXS_SatelliteNorthMovementDelta = 2.5; PXS_SatelliteTarget setPos [((getPos PXS_SatelliteTarget) select 0) - PXS_SatelliteNorthMovementDelta,((getPos PXS_SatelliteTarget) select 1) + PXS_SatelliteNorthMovementDelta,(getPos PXS_SatelliteTarget) select 2]; call PXS_fnc_UpdateCamera; }; //case 31://S Moves satellite camera backwards case (({_x in _pressedButtonArray} count (actionKeys "MoveBack")) > 0): { PXS_SatelliteSouthMovementDelta = 2.5; PXS_SatelliteTarget setPos [((getPos PXS_SatelliteTarget) select 0) + PXS_SatelliteSouthMovementDelta,((getPos PXS_SatelliteTarget) select 1) - PXS_SatelliteSouthMovementDelta,(getPos PXS_SatelliteTarget) select 2]; call PXS_fnc_UpdateCamera; }; //case 30://A Moves satellite camera left case (({_x in _pressedButtonArray} count (actionKeys "TurnLeft")) > 0): { PXS_SatelliteWestMovementDelta = 2.5; PXS_SatelliteTarget setPos [((getPos PXS_SatelliteTarget) select 0) - PXS_SatelliteWestMovementDelta,((getPos PXS_SatelliteTarget) select 1) - PXS_SatelliteWestMovementDelta,(getPos PXS_SatelliteTarget) select 2]; call PXS_fnc_UpdateCamera; }; //case 32://D Moves satellite camera right case (({_x in _pressedButtonArray} count (actionKeys "TurnRight")) > 0): { PXS_SatelliteEastMovementDelta = 2.5; PXS_SatelliteTarget setPos [((getPos PXS_SatelliteTarget) select 0) + PXS_SatelliteEastMovementDelta,((getPos PXS_SatelliteTarget) select 1) + PXS_SatelliteEastMovementDelta,(getPos PXS_SatelliteTarget) select 2]; call PXS_fnc_UpdateCamera; }; //Q Rotates satellite camera left case (({_x in _pressedButtonArray} count (actionKeys "LeanLeft")) > 0): { PXS_SatelliteCamera setVectorDirAndUp [[0,0,-1],[((vectorUp PXS_SatelliteCamera select 0)-0.05),1,0]]; }; //E Rotates satellite camera right case (({_x in _pressedButtonArray} count (actionKeys "LeanRight")) > 0): { PXS_SatelliteCamera setVectorDirAndUp [[0,0,-1],[((vectorUp PXS_SatelliteCamera select 0)+0.05),1,0]]; }; //case 78://Num + Zooms satellite camera in case ((({_x in _pressedButtonArray} count (actionKeys "ZoomIn")) > 0) || (({_x in _pressedButtonArray} count (actionKeys "MoveDown")) > 0)): { if ((PXS_SatelliteZoom + (0.02 * FACTOR)) <= 47) then { PXS_SatelliteFOV = PXS_SatelliteFOV - (0.0005 * FACTOR); PXS_SatelliteZoom = PXS_SatelliteZoom + (0.02 * FACTOR); call PXS_fnc_UpdateCamera; }; }; //case 74://Num - Zooms satellite camera out case ((({_x in _pressedButtonArray} count (actionKeys "ZoomOut")) > 0) || (({_x in _pressedButtonArray} count (actionKeys "MoveUp")) > 0)): { if ((PXS_SatelliteZoom - (0.02 * FACTOR)) >= 0.1) then { PXS_SatelliteFOV = PXS_SatelliteFOV + (0.0005 * FACTOR); PXS_SatelliteZoom = PXS_SatelliteZoom - (0.02 * FACTOR); call PXS_fnc_UpdateCamera; }; }; default { _return = false; }; }; }; _return Can anyone help please ? Share this post Link to post Share on other sites
Whipo0rwill 0 Posted January 20, 2020 Anyone still using this? I cant seem to get it to work. I can start the satellite but when picking where i want to view on the map is gives me error "Resource Pxs_RcsSatellite not found" anyone have this issue? Share this post Link to post Share on other sites