-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SUGGESTION] CQC Module #283
Comments
It's a huge overhead to distance check on each unit. Don't think it's really feasible if you want to keep things performant. |
From a lay persons perspective, |
You can get away with per group checks reasonably well. For example, if you had 10 groups and 40 players, that's 400 calculations every X seconds you check. Far better than 10 groups of units checking, which would result in like 3,200 calculations every X seconds (assuming 8 per group). Just unfortunately that didn't mesh with:
|
firednear might help with this too, combine it with an isplayer check on the firing unit and you have the inherent distance checking of the firednear with the player proximity checking built in. It's more like about 50m in terms of distance, but if you really want to then you can check the distance against that one unit, which is still less performance heavy than checking every player. |
In a near™ Arma update the behaviour change eventHandler will be added, which will provide an efficient manner to do this. |
Is your feature related to a problem? Please describe.
Current CQC is a bit naff in that the hallways are always stationary and the enemy units don't have any initiative. This is useful in situations to ensure the enemy doesn't fuck off out of defensive positions but doesn't allow the enemy to participate at all besides shooting.
Describe the solution you'd like
The module would work exactly like stationary units until we get into CQC. The module would then detect players within a random small radius (1-5m) around units (in buildings or bunkers) and allow movement of the ai unit. This would hopefully cause them to move into hallways and try engage the friendlies as we are clearing buildings. Hopefully would add some dynamics to the enemy when clearing instead of stationary units.
Could also add some code that forces the ai to point towards the nearest friendly unit or talking unit (I know we have an implementation of this but it's not exactly consistent) as we constantly open doors only to shoot AI in the back.
Describe alternatives you've considered
This is definitely already partially possible with triggers and the allow movement modules but that takes a bit more finicky playing with triggers and modules and doesn't allow for individual units to move as they detect players near their individual position.
Have the stationary units module have an option to enable CQC mode but having different modules makes the mission editing a bit clearer.
Additional context
CBA_Defend hold chance does a similar thing but units run out of position the instant they hear gunfire which leaves the city empty after a massive firefight at the edge of town.
The text was updated successfully, but these errors were encountered: