Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Start Drone Monitor*/
- DroneMonitorScript = [] spawn
- {
- HZ_Drone setCaptive true;
- HZ_Drone allowDamage false;
- HZ_Drone FlyInHeight 400;
- while {alive HZ_Drone} do
- {
- _count = 0;
- {if (HZ_Drone distance _x <= 500) then {_count = _count +1;};} forEach allUnits;
- if (_count >= 4) then
- {
- _location = HZ_Drone call BIS_fnc_locationDescription;
- driver HZ_Drone commandChat format ["UAV thermal scan located %1 possible targets %2",_count,_location];
- };
- sleep (60 * random 5);
- };
- };
- /*End Drone Monitor*/
- /*Start Drone Feed*/
- DroneTargetingScript = [_screen] spawn
- {
- _screen = _this select 0;
- _screen setObjectTextureGlobal [0, "#(argb,512,512,1)r2t(piprendertg,1)"];
- uav = createVehicle ["B_UAV_01_F", [0,0,0], [], 0, "FLY"];
- uav allowDamage false;
- createVehicleCrew uav;
- uav flyInHeight 75;
- _pos = getPos HZ_Drone;
- (group driver uav) copyWaypoints (group driver HZ_Drone);
- deleteVehicle HZ_Drone;
- uav setPos _pos;
- HZ_Drone = uav;
- HZ_Drone setVehicleVarName "HZ_Drone";
- HZ_DroneCam = "camera" camCreate [0,0,0];
- HZ_DroneCam cameraEffect ["Internal", "Back", "piprendertg"];
- "piprendertg" setPiPEffect [0];
- HZ_DroneCam camSetFov 0.2;
- HZ_DroneCam attachTo [HZ_Drone, [0,5,0], "PiP0_pos"];
- _pos = getpos HZ_Drone;
- _posx = _pos select 0;
- _posy = _pos select 1;
- _poz = _pos select 2;
- HZ_DroneCam camSetTarget [_posx,_posy,0];
- HZ_DroneCam lockCameraTo [[_posx,_posy,0], [0]];
- addMissionEventHandler ["Draw3D", {
- _dir =
- (HZ_Drone selectionPosition "PiP0_pos")
- vectorFromTo
- (HZ_Drone selectionPosition "PiP0_dir");
- HZ_DroneCam setVectorDirAndUp [
- _dir,
- _dir vectorCrossProduct [-(_dir select 1), _dir select 0, 0]
- ];
- }];
- while {alive HZ_Drone} do
- {
- _time = time;
- waitUntil {time > (_time + 60)};
- {
- if (HZ_Drone distance _x <= 250) exitWith //Only Exits foreach Loop but not the While true loop
- {
- _pos = getpos _x;
- HZ_DroneCam camSetTarget _pos;
- HZ_DroneCam lockCameraTo [_pos, [0]];
- };
- } forEach allUnits;
- };
- };
- /*End Drone Feed*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement