Strange Behavior with Chorded Actions

y_zou
Wed, 19 Jun 2024 23:00:47 +0000
Programming & Scripting

Hello everyone,

I’m new to Unreal Engine, having recently transitioned from Unity, so please bear with me as I navigate through this new environment. I’m currently working on expanding the action system based on Lyra. One of my attempts involves setting up controls where a ranged shot can be triggered by a left-click only if the player is aiming (with right mouse button), similar to controls in some ACT games. I came across something called “Chorded Action” which seemed to be the solution, but I’m experiencing some odd behaviors when it comes to weapon firing.

Here’s what I did:

start a new clean Lyra project in UE5.4.2 and opened a map (L_ShooterTest_FireWeapon).

add a new IA_Aim (like ADS but only for test purpose) next to IA_Weapon_Fire.

includ IA_Aim in IMC_Default as a Chord Action for both IA_Weapon_Fire and IA_Weapon_Fire_Auto.

Results:

When IA_Aim is used as a chord action for other actions (like jumping), it works as expected; the jump only triggers when IA_Aim is activated.

However, when IA_Aim is used as a chord action for IA_Weapon_Fire and IA_Weapon_Fire_Auto:

1. The Pistol can be triggered directly as before.

2. When IA_Aim is activated and left click, the Pistol starts firing continuously and won’t stop until the ammo runs out. (This seems like it could be fixed by modifying the Activation Policy in GA_Weapon_Fire_Pistol?)

3. It seems that IA_Weapon_Fire_Auto (which has a lower prio in IMC) is being block by IA_Weapon_Fire.

Has anyone else encountered similar issues with Chorded Actions, particularly in weapon systems? Any insights or suggestions on how to resolve these issues would be greatly appreciated. I’m wondering if there’s a better approach to setting up these controls or if there are specific settings in Chorded Actions that I might be missing.

2 posts - 2 participants