Jump to content
pirkleawesome

Radio Activated A.I Detection (RAAID)

Recommended Posts

Hey all, a while back I asked the technical wizard from my Unit to help me design a script. What we came up with is a way for AI to detect when a person is using radio (TFAR only, sorry) and locate that person. He used this script as a basis to get started, and then modified it to fit our needs. From months of using it during our ops, I would say that it has significantly improved our firefights due to the AI being more aware of players position. Anyway, here it is:

 

// Allow AI to hear players via their radio calls
["RadioDetect", "OnTangent", {  
    _unit = _this select 0;  
    _isLrRadio = _this select 2;
    _active = _this select 4;
    _distance = 1000;

    if (!_active) then {
        _entities = (_unit nearEntities ["CAManBase", _distance * 0.95]);

        {
            if (!isPlayer _x) then {
 
                private _value = linearConversion [0, _distance, _unit distance _x, 3.5, 1.5, true];

                _t = _x getVariable ["lastcall", 0];

                if (( _t - time) < -20 ) then {
                    [[_x, [_unit, _value]], "reveal", true, true] call bis_fnc_mp;
                    _x setVariable ["lastcall", time, true];  
                };
            };

        } foreach _entities;

    };
 
}, ObjNull] call TFAR_fnc_addEventHandler;

 

Since I have no scripting ability myself, and my friend doesn't have any interest it doing updates himself, this will likely be the first and only version.

I may be able to answer questions in a limited capacity.

 

Version: 1.0

 

Required mods: TFAR (we use 0.9.12)

  • Like 2

Share this post


Link to post
Share on other sites
On 6/16/2019 at 7:44 AM, pirkleawesome said:

What we came up with is a way for AI to detect when a person is using radio

TFAR 1.0 already has that integrated btw. Also detects speaking, and receiving radio transmissions if radio is set to speaker.
https://github.com/michail-nikolaev/task-force-arma-3-radio/tree/master/addons/ai_hearing

I think most of that code should also work for 0.9.12

 

Share this post


Link to post
Share on other sites

@Dedmen

Yeah, the guy in my unit who did the coding said as much, but it seemed just different enough imo that it would be useful to people.

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

×