Jump to content
Sign in to follow this  
Sertica

UAV Issues

Recommended Posts

I'm trying to get a Greyhawk to do surveillance all over Altis, but there are some issues:

1.  It does not obey waypoints.  On the ground it ignores all waypoints on the service roads and tries to drive straight toward the runway, ramming anything in the way.  Then it ignores the loiter wp altitude and flies at 100m instead.  It is supposed to land and take off periodically to refuel in my mission.

2.  I do not see a way to make the camera point down.  Ideally it should be combing the land grid looking along the y axis.

3.  I do not see a way to get the waypoints of an object in sqf.

Share this post


Link to post
Share on other sites

1. AI won't take off from a road as far as I know, and the altitude problem is known. You'll need to set it using flyInHeight -

 

2. Are you controlling the camera?

 

3. There's a number of waypoint commands, specifically waypoints or, depending on what you're doing, copyWaypoints, that do all manner of things with regards to waypoints.

Share this post


Link to post
Share on other sites

1.  I want to it move along the yellow lines at the airport and take off from the runway.  Jets follow the wp along the lines, but the Greyhawk does not.

2.  No.  The UAV is supposed to be fully automated on the side the players fight against.  At this point I doubt there is a way to make it useful anyway, because when I tested having it locked on a target the knowsabout stayed at zero unless I took control and used the reveal key.  I may need to have a player slot on the nato side for uavs.

3.  By object I mean the class Object.  The commands do not work on that.  But now I see how it works for the Greyhawk.  You createGroup, addVehicle to a group , then assign wp to the group.

Share this post


Link to post
Share on other sites

I thought of a hack to use uav for automatic spotting.  Using checkVisibility I should be able to do it.  I'm assuming this works like regular soldier vision, affected by fog and foliage.

highCommandWest = {
	[] spawn {
		while {true} do {
			_uavVisEnemyUnits = [];
			{
				if (side _x == independent) then {
					{
						_visibility = [uav, "VIEW", _x] checkVisibility [eyePos uav, eyePos _x];
						if (_visibility > 0) then {
							_distance = (eyePos uav) distance (eyePos _x);
							if (_distance < 2000) then {
								_uavVisEnemyUnits pushback _x;
							}
						}
					} forEach (units _x);
				}
			} forEach allGroups;
			sleep 5;
		};
	};
};

 

In the ignore parameters I put the uav and soldier so: (1) the uav turret does not need to be pointing in any particular direction (which I could not find a way to do in 3D) and (2) the soldier's body and stuff can't block the path to his eye.  The question remaining is what value range returned from checkVisibility should be accepted.  A wiki note says that blockAIVisibility 1 does not reduce it to 0.  Otherwise I have no clue what affects that number.

Share this post


Link to post
Share on other sites

In tests it seems to work like a charm where buildings and trees are blocking view.  The count of spotted units changes close to expected with 0.9 visibility requirement.

  • Like 1

Share this post


Link to post
Share on other sites
On 10/1/2020 at 6:33 AM, Sertica said:

the uav turret does not need to be pointing in any particular direction (which I could not find a way to do in 3D)

 

https://community.bistudio.com/wiki/lockCameraTo

I'm not 100% sure if it translates to the camera moving in 3D, but worth a try. I would imagine it does though.

Share this post


Link to post
Share on other sites

UnitPlay allows creating airport taxi paths, but there is a serious bug where the vehicle simulation completely freezes after record ends and the engine sound repeats in your ears permanently until the mission instance is aborted.  This makes recording segments with it highly inconvenient.  For each segment you need to copy the coordinates from the last frame of the previous record and set that as the position of the vehicle in the editor, then restart mission and resume from there.  Thus computerized airport traffic control is possible.

Share this post


Link to post
Share on other sites

One remaining problem: engine sounds don't play during animation.  I have code like this:

        greyhawk engineOn true;
        [greyhawk,play_ArriveToService2] spawn BIS_fnc_Unitplay;
        greyhawk engineOn true;
        [greyhawk,play_Service2ToDepart] spawn BIS_fnc_Unitplay;

But after the engine turns off automatically at the landing stop point I don't hear it again until it gets back to the takeoff stage.  There's also a strange contradiction where the air brakes are deployed on the Wipeout from external view but tucked from cockpit view.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×