haleks 8204 Posted May 24, 2022 Just gonna post this here since Discord is giving me headaches... I'm trying to add a new ActionListener on the "CharacterWalk" action, but for some reason it never fires... 😕 I've overridden the UpdateLocalPlayerController method in the SCR_PlayerController component : Spoiler modded class SCR_PlayerControllerClass: PlayerControllerClass { }; modded class SCR_PlayerController : PlayerController { //! Find if this is local player controller. We assume that this never changes during scenario. override void UpdateLocalPlayerController() { Print("TEST method begins"); m_bIsLocalPlayerController = this == GetGame().GetPlayerController(); if (!m_bIsLocalPlayerController) return; s_pLocalPlayerController = this; InputManager inputManager = GetGame().GetInputManager(); if (!inputManager) return; inputManager.AddActionListener("WeaponChangeMagnification", EActionTrigger.VALUE, ChangeMagnification); inputManager.AddActionListener("CharacterWalk", EActionTrigger.DOWN, OnWalk); inputManager.AddActionListener("CharacterWalk", EActionTrigger.UP, OnEndWalk); inputManager.AddActionListener("Inventory", EActionTrigger.DOWN, Action_OpenInventory ); inputManager.AddActionListener("TacticalPing", EActionTrigger.DOWN, Action_GesturePing ); inputManager.AddActionListener("TacticalPingHold", EActionTrigger.DOWN, Action_GesturePingHold ); inputManager.AddActionListener("TacticalPingHold", EActionTrigger.UP, Action_GesturePingHold ); inputManager.AddActionListener("CharacterWalk", EActionTrigger.DOWN, TestDebug_CharacterWalk); inputManager.AddActionListener("Inventory", EActionTrigger.DOWN, TestDebug_Inventory); Print("TEST method ends"); } //------------------------------------------------------------------------------------------------ void TestDebug_CharacterWalk() { Print("TEST W key down"); } //------------------------------------------------------------------------------------------------ void TestDebug_Inventory() { Print("TEST TAB key down"); } }; All debug hints are printed in the log console - except for "TEST W key down". I'm tempted to believe that for some reason that specific action doesn't fire - but it does have 2 vanilla methods (OnWalk and OnEndWalk) plugged to it... What's going on here? Share this post Link to post Share on other sites
haleks 8204 Posted May 24, 2022 Okay, found a workaround, I'm using the "CharacterForward" action instead. modded class SCR_PlayerControllerClass: PlayerControllerClass { }; modded class SCR_PlayerController : PlayerController { //! Find if this is local player controller. We assume that this never changes during scenario. override void UpdateLocalPlayerController() { Print("TEST method begins"); m_bIsLocalPlayerController = this == GetGame().GetPlayerController(); if (!m_bIsLocalPlayerController) return; s_pLocalPlayerController = this; InputManager inputManager = GetGame().GetInputManager(); if (!inputManager) return; inputManager.AddActionListener("WeaponChangeMagnification", EActionTrigger.VALUE, ChangeMagnification); inputManager.AddActionListener("CharacterWalk", EActionTrigger.DOWN, OnWalk); inputManager.AddActionListener("CharacterWalk", EActionTrigger.UP, OnEndWalk); inputManager.AddActionListener("Inventory", EActionTrigger.DOWN, Action_OpenInventory ); inputManager.AddActionListener("TacticalPing", EActionTrigger.DOWN, Action_GesturePing ); inputManager.AddActionListener("TacticalPingHold", EActionTrigger.DOWN, Action_GesturePingHold ); inputManager.AddActionListener("TacticalPingHold", EActionTrigger.UP, Action_GesturePingHold ); inputManager.AddActionListener("CharacterForward", EActionTrigger.DOWN, TestDebug_CharacterForwardDown); inputManager.AddActionListener("CharacterForward", EActionTrigger.UP, TestDebug_CharacterForwardUp); Print("TEST method ends"); } //------------------------------------------------------------------------------------------------ void TestDebug_CharacterForwardDown() { Print("TEST W key down");// It works ! } //------------------------------------------------------------------------------------------------ void TestDebug_CharacterForwardUp() { Print("TEST W key up");// It doesn't ! :( } }; However, a new mystery arises : the TestDebug_CharacterForwardUp method doesn't fire. 😕 Share this post Link to post Share on other sites
Tory Xiao 5 Posted May 24, 2022 is this the first reforger post on this forum? Share this post Link to post Share on other sites
Harzach 2505 Posted May 24, 2022 5 hours ago, Tory Xiao said: is this the first reforger post on this forum? There's discussion in the News section. There should be official subforums up soon-ish. Share this post Link to post Share on other sites
dreadedentity 278 Posted May 25, 2022 just wait for it to mature a little lol Share this post Link to post Share on other sites