Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
drunken officer

Current direction /amiedattarget arry

Recommended Posts

I've a turrent in my model. i need the current direction.

I can live with turrentdirection, gunnerdirection.

The problem is, the script returns just the direction, if the gunner enter his place or the direction when the object placed on map.

_cam = _this select 0;
while {alive _cam} do
{
_gunner = gunner _cam;
_dir1 = aimPos _cam;
_dir2 = getDir _gunner;
player sideChat format["%1 %2", _dir1, _dir2];
};

I try to handle it by another way with aimedattarget command. This need a "object".

When i named one object "testobj" it works with this line _tv = _cam aimedAtTarget [testobj];

But i've an array, because sometimes is not only one object close to my model.

_cam = _this select 0;
while {alive _cam} do
{
_no = nearestObject[b]s[/b] [_cam["car"],200];
{_tv =  _cam aimedAtTarget [_x] }forEach _no;
player sideChat format["%1", _tv] ;

This code returns "any"

Can somebody help me?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×