task-force-arma-3-radio icon indicating copy to clipboard operation
task-force-arma-3-radio copied to clipboard

Same SR frequencies per group

Open severgun opened this issue 5 years ago • 10 comments

When merged this pull request will:

  • Implement https://github.com/michail-nikolaev/task-force-arma-3-radio/issues/1468

There is quite big chance of collisions so may be it is necessary to add uniqueness test for first element in array, or instead of TFAR_FREQ_ROUND_POWER value should be set to 100.

severgun avatar Jun 19 '19 07:06 severgun

or instead of TFAR_FREQ_ROUND_POWER value should be set to 100

Would be a compatibility breaker.

I don't care much about uniqeness, we already don't care for the "same frequencies per side" feature.

dedmen avatar Jun 19 '19 18:06 dedmen

Fixes #1468

dedmen avatar Jun 19 '19 18:06 dedmen

I like this and this also works fine. But this only runs on serverInit, which runs once. If any player JIPs and while doing that creates a new group, this won't execute on his group. We'd need some kind of playerJoined/groupCreated eventhandler, to run this then.

dedmen avatar Oct 03 '19 12:10 dedmen

Added event. Will it work now?

severgun avatar Oct 13 '19 17:10 severgun

I don't like the 0 delay PFH, but if there is no better alternative.. Then I guess it has to be.

dedmen avatar Oct 14 '19 11:10 dedmen

There is no native BIS EH for group creation. So I think that is only one option. Delay can be increased but then there can be collisions when some groups deleted and some created during delay.

severgun avatar Oct 15 '19 06:10 severgun

There is no native BIS EH for group creation.

https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#GroupCreated https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#GroupDeleted

Do you want to update the PR with it or shall I merge this now and upgrade later?

dedmen avatar Apr 15 '22 08:04 dedmen

I will take a look at this week.

severgun avatar Apr 15 '22 09:04 severgun

Couple questions:

  1. "GroupCreated" fires for 33 groups even if only 1 exist.
  2. Old feature "group freqs" from group attributes does not work. Seems like attribute expression called before group is fully populated and values are not broadcasted.
  3. If "same per group" and "same for side" are selected, what we should take in favor?

severgun avatar Apr 17 '22 19:04 severgun

  1. I think there is something in vanilla code that creates bogus groups. But that was fixed recently-ish in a game update.
  2. Mh maybe we can just execNextFrame
  3. Closest wins, so group

dedmen avatar May 27 '23 17:05 dedmen