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

Ability to use AT Launchers in the prone position #7002

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

Conversation

PiZZAD0X
Copy link
Contributor

When merged this pull request will:

  • Enable state/stance transitions to the prone AT Launcher position
  • Uses a key EH to block engine state transition (which triggers the ArmA 3 statemachine behaviour that forces players out of the prone AT launcher state) and plays transition animations. This is the only solution I have found to get around the engine limitation of that state check. Any help on optimizing/making that workaround reliable is greatly appreciated.
  • Includes configs that fix the prone AT animation for aiming/headpos (ACE 2 Launcher Prone config port)
  • This PR needs animation work (the transitions between prone AT and standing AT, prone AT reload for muzzle loaded AT, and prone AT reload for breech loaded AT.

https://www.youtube.com/watch?v=7z6qmQPTAnA

@jonpas jonpas added the kind/feature Release Notes: **ADDED:** label May 16, 2019
@jonpas jonpas added this to the 3.13.0 milestone May 16, 2019
-removed unnecessary requiredAddons
@PabstMirror
Copy link
Contributor

Need to block keybind stuff when in ffv (e.g. offroad)

class Actions {
class CivilStandActions; // External class reference
class CivilProneActions : CivilStandActions {
SecondaryWeapon = "ACE_LauncherProne";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe all these ACE_ names should be replaced with GVAR/QGVAR values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class ACE_Climb: AmovPercMstpSnonWnonDnon_AcrgPknlMstpSnonWnonDnon_getInMedium {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As author of the ACE_Climb class, this is fine :P

addons/pronelauncher/config.cpp Outdated Show resolved Hide resolved
addons/pronelauncher/functions/fnc_onKeyDown.sqf Outdated Show resolved Hide resolved
addons/pronelauncher/functions/fnc_onKeyDown.sqf Outdated Show resolved Hide resolved
addons/pronelauncher/functions/fnc_onKeyDown.sqf Outdated Show resolved Hide resolved
addons/pronelauncher/functions/fnc_onKeyDown.sqf Outdated Show resolved Hide resolved
addons/pronelauncher/functions/fnc_onKeyDown.sqf Outdated Show resolved Hide resolved
Copy link
Contributor

@commy2 commy2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actionKeys is a broken command on my ban list.

addons/pronelauncher/functions/fnc_onKeyDown.sqf Outdated Show resolved Hide resolved
class RifleProneActions : RifleBaseStandActions {
SecondaryWeapon = "ACE_LauncherProne";
weaponOn = "ACE_LauncherProne";
weaponOff = "AmovPpneMstpSrasWrflDnon";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Questionale entry. Please explain.

};
class LauncherProne_Reload_End: AmovPpneMrunSrasWlnrDf {
actions = "ACE_LauncherProneActions";
speed = 0.7375;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of interest, where are these numbers from? They seem pretty random.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are, placeholders for when a nicer animation is found.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what would happen if you just set them to 1 or 0?

@AndreasBrostrom
Copy link
Contributor

Standalone release (https://steamcommunity.com/sharedfiles/filedetails/?id=1841047025) have been tested for 2 month in our community. People utalizing it have nothing to complain about or noticed any issues with that implementation.

@severgun
Copy link
Contributor

We playing with it for years. It is not common situation when you want to shoot from prone position but crawl quite often. Never heard complains from players too.

@PabstMirror
Copy link
Contributor

Should be able to rewrite the actionKey stuff with new 2.06 command

addUserActionEventHandler ["Prone", "Activate", { 
    if ((!alive ACE_player) || {!(isNull objectParent ACE_player)}) exitWith {};
    private _launcherWeapon = secondaryWeapon ACE_player;
    if ((_launcherWeapon == "") || {currentWeapon ACE_player != _launcherWeapon}) exitwith {};

    systemChat "@ prone";
    ACE_player playMoveNow "ACE_LauncherProne";
}];

addUserActionEventHandler ["moveUp", "Activate", { // (X) Crouch / Stand Up
    if ((!alive ACE_player) || {!(isNull objectParent ACE_player)}) exitWith {};
    private _launcherWeapon = secondaryWeapon ACE_player;
    if ((_launcherWeapon == "") || {currentWeapon ACE_player != _launcherWeapon}) exitwith {};

    if ((stance ACE_player) == "PRONE") then {
        systemChat "@ moveUp from prone";
        ACE_player playMoveNow "AmovPpneMstpSrasWlnrDnon_AmovPknlMstpSrasWlnrDnon";
    };
}];

addUserActionEventHandler ["MoveDown", "Activate", { // (Z) Go Prone / Stand Up
    if ((!alive ACE_player) || {!(isNull objectParent ACE_player)}) exitWith {};
    private _launcherWeapon = secondaryWeapon ACE_player;
    if ((_launcherWeapon == "") || {currentWeapon ACE_player != _launcherWeapon}) exitwith {};

    if ((stance ACE_player) == "PRONE") then {
        systemChat "@ moveDown from prone";
        ACE_player playMoveNow "AmovPpneMstpSrasWlnrDnon_AmovPknlMstpSrasWlnrDnon";
        ACE_player playMove "AmovPknlMstpSrasWlnrDnon_AmovPercMstpSrasWlnrDnon";
    } else {
        systemChat "@ moveDown from non-prone";
        ACE_player playMoveNow "ACE_LauncherProne";
    }
}];

The only other issue is the animation speed seems way too fast.
It feels like you can drop to prone about 5 times faster than normal.

@Drofseh
Copy link
Contributor

Drofseh commented Jun 5, 2022

@PiZZAD0X do you plan to continue working on this?

@PiZZAD0X
Copy link
Contributor Author

PiZZAD0X commented Jun 5, 2022

@PiZZAD0X do you plan to continue working on this?

I am not an animator and I don't mind if anyone wants to modify or add on to this. (or any mod I make) I am very busy with work.

@Drofseh
Copy link
Contributor

Drofseh commented Jun 5, 2022

@PiZZAD0X do you plan to continue working on this?

I am not an animator and I don't mind if anyone wants to modify or add on to this. (or any mod I make) I am very busy with work.

Besides the animations is it complete?

@PiZZAD0X
Copy link
Contributor Author

PiZZAD0X commented Jun 5, 2022

@PiZZAD0X do you plan to continue working on this?

I am not an animator and I don't mind if anyone wants to modify or add on to this. (or any mod I make) I am very busy with work.

Besides the animations is it complete?

People have been using it for a while and no reported issues as long as they are running it with ACE. It seems functional and stable. Some of the animation timers are a little quick, they were all placeholders.

@JonBons
Copy link
Contributor

JonBons commented Jul 8, 2022

I've been testing this with a merged version of this PR combined with PabstMirror's script and its been working great.

@kymckay kymckay modified the milestones: Ongoing, 3.15.1 Jul 8, 2022
@kymckay
Copy link
Member

kymckay commented Jul 8, 2022

I've put this on the next release milestone for re-review since it sounds like we could probably get it in.

@AndreasBrostrom
Copy link
Contributor

Our community have reported that the back blast cone is aimed to the right instead of the weapon direction.

Unsure if this have been changed or fixed since our test implemention.

I have not tested the current state of this PR if this is resolved. But it can be worth being aware of.

@johnb432
Copy link
Contributor

[...] the back blast cone is aimed to the right instead of the weapon direction.

I can't reproduce with the Mk4 MAAWS nor with several other modded launchers and I can't understand why that would have ever been the case. Overpressure takes the direction of the projectile into account when it does it's backblast calculations. I'll consider this resolved.

@PiZZAD0X PiZZAD0X requested a review from jonpas June 30, 2024 11:59
@AndreasBrostrom
Copy link
Contributor

[...] the back blast cone is aimed to the right instead of the weapon direction.

I'll consider this resolved.

Alright its fair enougth. Might be our implementation that had a bug then. We have not updated the code since Jul 15 2021.

- Ignore key inputs when in Zeus
- Slowed down reloading animation when prone to match "regular" reload time
Copy link
Contributor

@johnb432 johnb432 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Do we want to rename the states? See https://github.com/acemod/ACE3/pull/7002/files#r284980144.
    Imo we should follow updated practices and use the macros to prefix the animations, but I'd like to get more opinions on this.
  • Need to address https://github.com/acemod/ACE3/pull/7002/files#r285871818 - I have no idea what to think here, hoping people with more knowledge can shed light on the subject.
  • The transition to prone launcher is way too quick atm. I've tried to slow it down, but I've not managed to implement a way of doing it. I have the impression we need transition animations, but animations are really out of my field of knowledge.
  • Bug that needs to be fixed: When switching from Binos to Launcher when prone, everything works as intended. But if you switch from Launcher to Binos, it makes the character kneel instead of remaining prone. I tried to fix it, but I didn't manage to.

HandGunOn = "AmovPpneMstpSrasWpstDnon";
stance = "ManStanceProne";
ReloadRPG = "LauncherProne_Reload_Start";
//GestureReloadRPG7[] = {"GestureReloadRPG7Kneel", "Gesture"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out? If we don't need it, remove it.

Comment on lines +74 to +83
// Prone Stopped Launcher -> Standing Stopped Launcher
//class AmovPpneMstpSrasWlnrDnon_AmovPercMstpSrasWlnrDnon: TransAnimBase {
// actions = "LauncherStandActions";
// duty = 2;
// enableOptics = 1;
// reverse = "AmovPercMstpSrasWlnrDnon_AmovPpneMstpSrasWlnrDnon";
// interpolateTo[] += {
// "AmovPercMstpSrasWlnrDnon", 0.02
// };
//};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

#define COMPONENT_BEAUTIFIED Prone Launcher
#include "\z\ace\addons\main\script_mod.hpp"

#define DEBUG_MODE_FULL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merging:

Suggested change
#define DEBUG_MODE_FULL
// #define DEBUG_MODE_FULL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Release Notes: **ADDED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet