Jump to content
Barba-negra

players detected by artificial intelligence

Recommended Posts

good morning to all guys, a greeting and a hug, I wanted to ask here if there are any scripts that make the AI can detect players when they speak for the microphone at a certain distance?

  • Like 1

Share this post


Link to post
Share on other sites

ACRE2 mod does this and I think the Beta version of TFAR does it too. If you don't want an additional mod there is this system, but it doesn't take AIs into account I think. Scripting it might be possible, detect when the player uses the push to talk key and reveal them to nearby enemies maybe?

Share this post


Link to post
Share on other sites

I've been reading about it, and affectively the ACRE2 apparently does it, but the current version of the radio task force does not do it, and done tests and nothing, and ideally I could hear you even without using the radio at a pre-determined distance, I've got something here but I have not made it work 

 

https://github.com/michail-nikolaev/task-force-arma-3-radio/issues/902

Share this post


Link to post
Share on other sites

Does that version do it without using a separate script? that is, is the scritpts included?

Share this post


Link to post
Share on other sites

There is a script of the radio task force that I would like to understand but I do not understand how it works, this is it, but what is it for? this is possible to place it through a radio, and when I speak the event is activated ?, I really do not understand very well how this works 

 

API: Events

 

Use the following calls:

 

TFAR_fnc_AddEventHandler – to add an event handler

TFAR_fnc_removeEventHandler – to remove it.

 

Examples

 

[MyID, EventName, Code, Object] call TFAR_fnc_addEventHandler;

// binding to the player object: ["MyID", "OnSpeak", { hint format ["%1 %2 speaking", _this select 0, if(_this select 1)then{"is"}else{"isn't"}]; }, Player] call TFAR_fnc_addEventHandler;

 

// binding to the mission namespace and not the player object in particular: ["MyID", "OnSpeak", { hint format ["%1 %2 speaking", _this select 0, if(_this select 1)then{"is"}else{"isn't"}]; }, ObjNull] call TFAR_fnc_addEventHandler;

 

// removing event handler that was bound to the player: ["MyID", "OnSpeak", player] call TFAR_fnc_removeEventHandler

 

// removing event handler that was bound to the mission namespace: ["MyID", "OnSpeak", objNull] call TFAR_fnc_removeEventHandler

 

is from this page https://github.com/michail-nikolaev/task-force-arma-3-radio/wiki/API:-Functions#TFAR_fnc_addEventHandler

  • Like 1

Share this post


Link to post
Share on other sites

Yes it adds an event handler (and from that you can script what you want to achieve ) but again tfar beta does it (I use acre2 so I'm only 90% sure ). Either use acre or tfar beta and you won't even have to bother scripting it.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Easy options are as @Mr H. said, TFAR/ACRE2. However... You may be able to do this in vanilla using keyDown EH and inputAction. Though this will trigger if you press the VoN key, not sure if you can return real transmission.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, HazJ said:

Easy options are as @Mr H. said, TFAR/ACRE2. However... You may be able to do this in vanilla using keyDown EH and inputAction. Though this will trigger if you press the VoN key, not sure if you can return real transmission.

That's what I had in mind too. Don't think there are many other options to do this.

  • Like 1

Share this post


Link to post
Share on other sites

ok friends I'm trying to create a script that when the player speaks within a specific radius, a trigger is triggered, but I do not know if I'm okay could they get a hand?

 

[] spawn  { 

 

if ( speaker player ) then { triggerActivated trg1}

 

};

 

 

Share this post


Link to post
Share on other sites

This returns the speaker voice of a unit I believe? A getter for the setSpeaker command.

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

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

Not tested:

_display = findDisplay 49;

voiceKeyEH = _display displayAddEventHandler ["KeyDown",
{
	if (param [1] isEqualTo inputAction "voiceOverNet") then
	{
		// player is pressing VoN key...
		hintSilent "player is pressing VoN key...";
	} else
	{
		// player is NOT pressing VoN key...
		hintSilent "player is NOT pressing VoN key...";
	};
}];

 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, HazJ said:

if (param [1] isEqualTo inputAction "voiceOverNet") then

:icon_confused: so if the display isEqualTo number

if ( inputAction "voiceOverNet" > 0 ) then

 

  • Like 2

Share this post


Link to post
Share on other sites

thank you, mates, I am going to try, this would be more complicated to do, if for example the player has voice recognition enabled and does not use a key to talk? Well, although I think that's only if TFR or Acre is used?

Share this post


Link to post
Share on other sites

I'm testing it, and nothing happens after pressing the key, I put it in the init, and I also test it with a trigger, will it have something to do if I have the radio task force activated?

Share this post


Link to post
Share on other sites

What @HazJ and @Larrow gave you are just the bases to create your own script nothing will happen if you use it as is. I don't use the vanilla von system but I think it cannot be voice activated and you must use a key. Again this is only a necessary step if you use vanilla von (or the base version of tfar) using tfar beta  or acre make this unnecessary since detection by AI are built in features.

  • Like 2

Share this post


Link to post
Share on other sites
14 hours ago, Larrow said:

:icon_confused: so if the display isEqualTo number


if ( inputAction "voiceOverNet" > 0 ) then

 

Yeah that! :icon_biggrin:

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

×