Jump to content
Sign in to follow this  
lawndartleo

Secops and UAV terminal (and arty animations of you can, too)

Recommended Posts

Having read much lately I came across this little ditty

[["transport", "aerial_reconnaissance", "supply_drop", "tactical_airstrike", "artillery_barrage"], player] call BIS_SOM_addSupportRequestFunc;

from http://community.bistudio.com/wiki/Secondary_Operations_Manager

It's quite handy and I have had some success with it but I still have 2 outstanding issues.

1) I am unable to create a terminal that I can use to monitor the UAV. It flies around nicely but there is no way to see the view from above. Any solution I have tried comes back with "UAV destroyed".

2) I am unable to connect atillery placed in the field so that I can see the animation. I get the arty (off screen from never, never land) but not an animation as I would (and do, quitenicely) if follow this example

. Maybe it can't be (and I can live with that).

I'd still like to get the UAV terminal sorted.

Advice appreciated

---------- Post added at 09:39 PM ---------- Previous post was at 08:32 PM ----------

Artillery issue resolved. Just need to get the UAV sorted.

Edited by lawndartleo

Share this post


Link to post
Share on other sites

No, that is not it and yes I have been all over that and similiar pages. If I seperate the UAV from the SOM it's a slam dunk.

If you ring up

[["transport", "aerial_reconnaissance", "supply_drop", "tactical_airstrike", "artillery_barrage"], player] call BIS_SOM_addSupportRequestFunc;

in the editor, you get them all but there is no interface with the UAV that I can accomplish. You can mark the flyover spot on the map but it's pointless if you can't interface with the UAV to see what is going on. That line of code is right form the BIS wiki but it has zero explanation.

http://community.bistudio.com/wiki/Secondary_Operations_Manager

Drop and synch the SOM, create the trigger with that syntax. Done. Transport, supply drop, tactical airstrike and artillery barrage all work. Aerial recon does not, at least in that there is no interface to see what the eye in the sky is seeing.

Just for the sake of discussion, lets take the wiki piki...

Uav.jpg

If you are using a SOM, there is no UAV added to the map, the engine generates it on the call. Once it comes out of wherever, how do you link with it?

---------- Post added at 04:11 AM ---------- Previous post was at 03:44 AM ----------

Is the correct translation of this German forum post...

UAV:

Auch hier gilt die gleiche Vorgehensweise wie bei der Artillerie, derzeit ist mir leider nicht bekannt das sich hierrüber auch die FLIR ansicht abruffen lässt. Kann über Mapclick Kordiniert werden.
It'll fly where you tell it to but the FLIR is not accessable so you really can't see anything.

Original post at http://arma2-editing.blog.de/2009/06/14/artillerie-som-modul-6299911/

Edited by lawndartleo

Share this post


Link to post
Share on other sites

Hmm I think I remember reading some posts about it being buggy/broken, so it might not be fixable if you want to use the SECOPS version of the UAV.

The only thing I could think to try would be to use synchronizeObjectsAdd to try to synchronise the UAV terminal with the UAV. Maybe you could find the UAV after it's been spawned by the SECOPS module or such?

What happens if you add a UAV at the start of the mission and sync the secops module with that? Sounds like a long shot, but maybe it'd work.

Share this post


Link to post
Share on other sites

I've played connect the dots with EVERYTHING. I know that this is a community forum and it's mostly user to user help. Is there a way to get this in front of a BIS developer. It's a documented feature. The question becomes is the feature broke at the moment or the documentation incomplete.

I'll try your synch idea and report results.

Share this post


Link to post
Share on other sites

Probably the best place is to report it via CIS at dev-heaven - it's a community-run issue tracker that BIS' developers do actually use.

You could also try posting a concise and clear description of the problem in the troubleshooting forum here.

Share this post


Link to post
Share on other sites

If a UAV appears by way of a SOM request, how would one go about getting the unique NAME of the UAV spawned by the SOM? Once that NAME is known, I am wondering if it might be possible to synch it by script as required. All I need to know is how to get that NAME.

Edited by lawndartleo

Share this post


Link to post
Share on other sites

The only way I can think of to get the identifier of the UAV is to loop through all the units on the map at the time, test each for type, and if one is an UAV, try to sync it.

But, depending on why you want it, you may also be able to spawn a UAV in the right place, and "fake" it.

From my experience using the SOM on-call UAV, you don't really need the FLIR, as it gives you an almost magic-map view of every unit in the vicinity of where it flies.

Share this post


Link to post
Share on other sites

Came across this fn_sceneGetObjects.sqf. I'm wondering if this can be used to fetch the name of the UAV and all other units.

I made an init.sqf with

waitUntil { !alive joe };
execvm  "fn_sceneGetObjects.sqf";

Then I made joe (rip, sorry joe)

Then I drop in the SOM module and the appropriate trigger and a FUNCTIONS module

[["transport", "aerial_reconnaissance", "supply_drop", "tactical_airstrike", "artillery_barrage"], player] call BIS_SOM_addSupportRequestFunc; 

I call the UAV and make it fly overhead at whoch point joe takes on in the head.

hoping that the following .SQF would generate a list but all it generates is [].

I am completely unknowledgeable about this stuff but i am as determined as I can be for figure the dam thing out.

[s]scriptName "Functions\misc\fn_sceneGetObjects.sqf";
/*******************************************************************************
*
*	version: 	1.0
*	name:		sceneGetObjects	
*	description:	part of S.C.E.N.E.S. This script gets objects positions 
*			and direction relative to the choosen object
*			more info on: https://wiki.bistudio.com/index.php/SCENES    	
*	author:		zozo
*	paramater:	object or marker 
*			(its position will be selected as a center of the scene)
*			optional: x, y - size of the area which objects will be 
*			exported from 	
*	return value:	nothing 	
* 
******************************************************************************/ [/s]
private["_TRIGX", "_arrayOfObjectsType"];

_TRIGX = 20;			//trigger
_TRIGY = 20;			//area

_arrayOfObjectsType = [];
_centrum = _this select 0;

if((count _this) == 2) then
{
_TRIGX = _this select 1;
};
if((count _this) == 3) then
{
_arrayOfObjectsType = _this select 2;
_TRIGX = _this select 1;
}
else
{
_arrayOfObjectsType = ["All"];	//only type objects we will need
};


textLogFormat ["Pole objektu je: %1", _arrayOfObjectsType];
[_centrum, _TRIGX, _arrayOfObjectsType]spawn
{
_centrum = _this select 0;
_TRIGX = _this select 1;	
_arrayOfObjectsType = _this select 2;

_centrumPos = [];
_centerAngle = 0;

if(typeName _centrum == "Object") then
{
	_centrumPos = getpos _centrum; 
	_centerAngle = getdir _centrum;
}
else
{
	_centrumPos = getmarkerpos _centrum; 
	_centerAngle = markerdir _centrum;
};

Sleep 0.1;
_listOfObjects = (nearestObjects [_centrumPos, ["All"], _TRIGX]) - [centrum];
_xLoop = (count _listOfObjects) - 1;
textLogFormat["Objects included to export: %1", str _listOfObjects];
DEBUGLOG "[sIFL]: SCRIPTED EXPORT START----------------------------------------";
_positions = [];
while{_xLoop >= 0} do
{
	_objectToGet = _listOfObjects select _xLoop;

	_type = typeOf _objectToGet;
	_sim = getText (configFile >> "CfgVehicles" >> _type >> "simulation");

	if !(_sim in _arrayOfObjectsType) then
	{
		_computedAbsAngle = [_centrumPos, getpos _objectToGet] call bis_fnc_dirTo;

		if(_computedAbsAngle < 0) then
		{
			_computedAbsAngle = 360+_computedAbsAngle;
		};

		_computedAngle = _computedAbsAngle - _centerAngle;

		if(_computedAngle < 0) then
		{
			_computedAngle = 360+_computedAngle;
		};

		_distance 	=  (getpos _objectToGet) distance (_centrumPos);
		//_distance	= [_centrumPos, _objectToGet] call BIS_fnc_distance2D;
		//_distance 	=  (_objectToGet modelToWorld [0,0,0]) distance (_centrumPos);
		_newDir 	= (getdir _objectToGet - _centerAngle);
		_objectClass 	= typeOf _objectToGet;
		_nameOfObject	= VehicleVarName _objectToGet;
		_vectorDir	= vectorDir _objectToGet;
		_vectorUp	= vectorUp _objectToGet;
		_animation	= animationState _objectToGet;
		_elevASL	= getposASL _objectToGet select 2;
		_elev		= getpos _objectToGet select 2;

		if(_nameOfObject == "") then
		{
			_objectToGet = "";	
		};
		_positions = _positions + [_nameOfObject, _objectClass, _objectToGet, _computedAngle, _distance, _newDir, _vectorUp, _vectorDir, _animation, _elevASL, _elev];


		//	hint format["Vypocteny abs. uhel: %1\nRelativni uhel: %2\nVzdalenost: %3\nNewdir: %4",_computedAbsAngle, _computedAngle ,_distance, _newDir];
		//	textLogFormat["newpos = [%1, %2, ""%3"", ""%3""] call BIS_fnc_sceneGetPositionByAngle;", _computedAngle, _distance, _centrum];
		//	textLogFormat["%1 setpos newpos; %1 setdir (%2 + markerdir ""%3"");", _objectToGet, _newDir, _centrum];
		//	textLogFormat["%1, %2, %3, %4", _objectToGet, _computedAngle, _distance, _newDir];
	};		
	_xLoop = _xLoop - 1;
	Sleep 0.0001;
};  
copyToClipboard str _positions;
textLogFormat ["_positions = %1", _positions];

DEBUGLOG "[sIFL]: SCRIPTED EXPORT END------------------------------------------";
};

Edited by lawndartleo

Share this post


Link to post
Share on other sites

Err.. if you want to go that route, I think nearestObject will be simpler... assuming there's only one UAV in the game that would suffice. Otherwise, nearestObjects could be made to work.

Something along the lines of

_uav = nearestObject [player, "MQ9PredatorB"]

Share this post


Link to post
Share on other sites

Nearest object of given type to given position within a range of 50 meters.

kinda shoots that to heck... how do I get within 50 meters of it?

Share this post


Link to post
Share on other sites

Oops, didn't notice that - there was a discussion earlier which implied nearestObject searches the entire map.

In that case... either use nearestObjects and specify a large distance, or iterate through allUnits until you find a UAV?

_uav = objNull;
{
 if (_x isKindOf "UAV") exitWith { _uav = _x; };
} forEach allUnits;

if (not isNull _uav) then
{
 // do stuff with the UAV
};

Or something like that...

Share this post


Link to post
Share on other sites

K.... lead me by the nose here a little. How do i implement your...

_uav = objNull;
{
 if (_x isKindOf "UAV") exitWith { _uav = _x; };
} forEach allUnits;

if (not isNull _uav) then
{
 // do stuff with the UAV
};

Edited by lawndartleo

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  

×