michail-nikolaev / task-force-arma-3-radio

TeamSpeak integration for Arma 3
http://radio.task-force.ru/en/
Other
313 stars 168 forks source link

Detect actual voice volume for AI notification #1454

Open dedmen opened 5 years ago

dedmen commented 5 years ago

Start a PFH (every 2-3 seconds) once local player starts speaking and set internal plugin setting to let the plugin record peak voice volume of microphone of the last 2 seconds. Every 2 seconds plugin clears volume (chrono timepoint, and check if time is up right after the setting check)

Inside the PFH retrieve players audible range. Plugin can do the calculation, we probably want the same algorithm as for normal voice range.

Then inside PFH notify nearby AI's that are inside that range.

Btw also fix TFAR_ai_hearing_fnc_revealInArea not use count.

All that enabled by default disabled setting, and if it's enabled then skip the reveal on talk start/end and radio start/end. Radio sounds are only played in headset, they are not audible on outside.

soryy708 commented 3 years ago

Doesn't LAMBS already do this?

Saborknight commented 3 years ago

Lambs will distribute any data that a single AI will discover pertaining to enemy force location and contact state. Lambs is not capable of "hearing" players, TFAR's AI Hearing addon is the one responsible for this.

Then inside PFH notify nearby AI's that are inside that range

What he means here is just telling the AI in audible range that there's someone in this or that general direction