Jump to content
Dj Rolnik

BIS_fnc_inAngleSector - Approximated position [help needed]

Recommended Posts

Hey guys,

 

I am working on a mission which utilizes a script allowing the players to shout to civilians based on distance and angle from the civie. Whenever the civilian is within a given radius and a specific angle from the player, then the latter receives an action allowing him to shout commands etc.

 

The script works fine and all, but I am seeing a problem where the action appears/reappears pretty randomly when the civilians are running/moving OR RATHER when there are obstacles and uneven terrain around. I believe that the BIS_fnc_inAngleSector , which is the condition for the addAction, keeps returning an exact position of the civilian and when he keeps moving, changing altitudes or when there are objects around, the function just loses track and makes the action appear/disappear pretty randomly.

 

I may be wrong on this but that's the only thing that comes to my mind.

 

That's for the context. Now whe actual question I have is: do you think it's possible to feed some kind of modified position array of the civilian, so that it will search "around" his actual position?

player nearEntities [ "MAN", _radius ] select { side _x isEqualTo civilian && { [ getPosATL player, getDir player, _angle, getPosATL _x ] call BIS_fnc_inAngleSector } }

 

Thanks a lot!

Adam

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

×