Skip to content
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

Projectiles #371

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Projectiles #371

wants to merge 27 commits into from

Conversation

ampersand38
Copy link
Member

@ampersand38 ampersand38 commented May 7, 2020

When merged this pull request will:

@mharis001 mharis001 added the feature Adds a new feature label May 7, 2020
@mharis001 mharis001 added this to the 1.8.0 milestone May 7, 2020
@BrettMayson
Copy link
Contributor

Is it possible to predict the arc? I am not a fan of the module for switching between high / flat. It would be nice to have an approximate arc, and use a keybind to switch modes while placing the target.

addons/modules/XEH_PREP.hpp Outdated Show resolved Hide resolved
addons/modules/CfgVehicles.hpp Outdated Show resolved Hide resolved
addons/modules/functions/fnc_moduleThrowSmoke.sqf Outdated Show resolved Hide resolved
addons/modules/functions/fnc_projectiles_unit.sqf Outdated Show resolved Hide resolved
@jonpas
Copy link
Contributor

jonpas commented May 7, 2020

How does one select a grenade that's not part of that selection? Eg. some mod adds a dart (just a random thing I came up with right now), with this implementation of multiple modules, can one do that?

That arc doesn't really seem to be an arc, it's just a straight line? I don't really see the reason for that as a module, could be a CBA Setting for those scenarios where Zeus needs to be limited or someone can't handle line drawing performance. No need to clutter the modules.

@BrettMayson
Copy link
Contributor

How does one select a grenade that's not part of that selection?

A module for just throwing that gets all the throwables would be better, could be done with BIS_fnc_isThrowable

@ampersand38
Copy link
Member Author

ampersand38 commented May 7, 2020

Is it possible to predict the arc? I am not a fan of the module for switching between high / flat. It would be nice to have an approximate arc, and use a keybind to switch modes while placing the target.

It's using the initSpeed and calculating the launch angle such that the ballistic arc hits the targetPos. There's always 2 possible arcs.

@ampersand38
Copy link
Member Author

ampersand38 commented May 7, 2020

That arc doesn't really seem to be an arc, it's just a straight line? I don't really see the reason for that as a module, could be a CBA Setting for those scenarios where Zeus needs to be limited or someone can't handle line drawing performance. No need to clutter the modules.

High Arc would be needed for hitting a roof top, or over a wall, for example.

@ampersand38
Copy link
Member Author

How does one select a grenade that's not part of that selection?

A module for just throwing that gets all the throwables would be better, could be done with BIS_fnc_isThrowable

That would be a useful feature. I've worked on the standard stuff because it's faster to not have to choose a throwable.

@jonpas
Copy link
Contributor

jonpas commented May 8, 2020

What about using ZENs context menu? Select AI, right click at location to throw. Clicking "Throw" would throw something based on some priority (or just first available), sub-menu for manual selection.

Same for "Launch", launcher or GL.

@ampersand38
Copy link
Member Author

ampersand38 commented May 8, 2020

What about using ZENs context menu? Select AI, right click at location to throw. Clicking "Throw" would throw something based on some priority (or just first available), sub-menu for manual selection.

Same for "Launch", launcher or GL.

Is it currently possible to open context menu with AI selected? The default right click of course sets a waypoint. Oh I see, using _hoveredEntity.

Are grenade commands used frequently enough to deserve a spot on every unit's context menu?

@bux
Copy link
Contributor

bux commented May 8, 2020

Are grenade commands used frequently enough to deserve a spot on every unit's context menu?

imho, no

@ampersand38
Copy link
Member Author

ampersand38 commented May 8, 2020

Latest Throw Select module lists unit's available throwables in context menu between dropping the module and selecting target position.

I haven't worked out how to remove the actions if menu is closed without choosing one of the throwables. https://youtu.be/HItqwS8pbkk
Is there an event for closing the menu?

Same for "Launch", launcher or GL.

These have additional complication of loading the chosen round, if we're not just shooting whatever is loaded.

If there's no demand for being able to throw frag/stone/smoke regardless of actual availability, I can cut down the modules to:

ThrowSelect
GL
Launcher
Trajectory

@bux
Copy link
Contributor

bux commented May 8, 2020

Are grenade commands used frequently enough to deserve a spot on every unit's context menu?

Possible way to fix this could be the following idea, that is - of course - not in scope of this PR.
Use keyboard modifiers to open different context menus:

  • Hold down Alt and right click to get the offensive targeted context menu actions like throwing grenades or a quick access to a "search and destroy" waypoint
  • Hold down Shift while right clicking to get the more defensive targeted context menu actions. ....
  • etc ...

I don't know if that's possible at all, maybe that's an idea @mharis001 could use.

Such modifiers to open different context menus are already used in different graphic software. So it's not something completely uncommon 😄

@CreepPork
Copy link
Member

I would let you know a similar feature is in development too: #132

@ampersand38
Copy link
Member Author

ampersand38 commented May 8, 2020

spawn and waitUntil have been CBA-ized.
Throw selected grenade is working properly.
Fire Launcher is more reliable.
https://www.youtube.com/watch?v=zLU1RAM9rao

@mharis001
Copy link
Member

I dislike the addition of this many modules. I think it can be limited to Fire Launcher, Fire GL, and Throw Grenade. Modules that require ALiVE should be removed. Also, the various actions do not work if the unit is in combat.

The current implementation into the context menu is pretty rough. If we want to keep that, it would be better to have only grenade actions shown. That requires a small change to context_menu which would allow entirely different action trees to be used when opening the menu - something I was planning on doing eventually for #132 .

For what @bux suggested, cba_events_shift and cba_events_alt can be used for the action conditions to achieve that.

@ampersand38
Copy link
Member Author

ampersand38 commented May 12, 2020

I've removed and renamed the extraneous modules. I've noticed that throw commands sent while units are in certain actions (reloading, sprinting, or suppressing) will be delayed or ignored, but most are executed. https://youtu.be/xOgiUzg8214

@ampersand38
Copy link
Member Author

@mharis001 mharis001 modified the milestones: 1.8.0, 1.9.0 May 19, 2020
@Kexanone
Copy link
Member

Kexanone commented May 23, 2020

I really like these features. I considered getting launchers working for AI as impossible for some while. It works as good as it can considering how hard it is getting alerted ArmA AI to do what you want them to do. However, I have a few comments:

  • Did you try getting missile launchers working? There apparently is a setMissileTarget command. I have never used it so far tbh.
  • It seems that I somehow managed to break the modules when I used them a lot. Unfortunately, I haven't figured it out how to reproduce it. When it is broken, the module is always executed for the same unit, no matter on which unit I place the module.
  • Throw select: It would be better to get rid of all the other context menu entries that are unrelated to the module.

@Kexanone
Copy link
Member

I'm curious about your formula for calculating the initial angle. Do you have a reference or derivation for it?

@ampersand38
Copy link
Member Author

I'm curious about your formula for calculating the initial angle. Do you have a reference or derivation for it?

I got it from this video https://www.youtube.com/watch?v=bqYtNrhdDAY

@ampersand38
Copy link
Member Author

Now working with soft launch weapons (RPG, NLAW, Titan, Vorona) https://youtu.be/gSjC2l98-Ps

@mharis001 mharis001 modified the milestones: 1.10.0, 1.11.0 Feb 3, 2021
@CreepPork
Copy link
Member

For the grenades a graphical drawing like ACE's advanced throwing would be excellent for this.

@mharis001 mharis001 modified the milestones: 1.11.0, 1.12.0 May 25, 2021
@mharis001 mharis001 modified the milestones: 1.12.0, 1.13.0 Sep 3, 2021
@mharis001 mharis001 modified the milestones: 1.13.0, Backlog Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants