Page 1 of 1

5.5 Input Action not working[SOLVED]

Posted: Mon Aug 27, 2018 7:18 am
Hello Community!

I'm coming back to CE once more. However, I'm having issues with trying to get Actions to work. I have this:

Player.cpp (Initialize() function)

Code: Select all

m_pInputComponent->RegisterAction("player", "quitgame", [this](int activationMode, float value) { CryLogAlways("QUIT GAME"); }); m_pInputComponent->BindAction("player", "quitgame", eAID_KeyboardMouse, EKeyId::eKI_Escape);
defaultInput xml file

Code: Select all

<profile version="0"> <platforms> <PC keyboard="1" xboxpad="1" ps4pad="1"/> <XboxOne keyboard="1" xboxpad="1" ps4pad="0"/> <PS4 keyboard="1" xboxpad="0" ps4pad="1"/> </platforms> <!--DO NOT REMOVE DEFAULT ACTIONMAP! NEEDED BY CRYACTION.--> <actionmap name="default" version="1"/> <!----> <actionmap name="player" version="1"> <action name="moveleft" onPress="1" onRelease="1" retriggerable="1" keyboard="a"/> <action name="moveright" onPress="1" onRelease="1" retriggerable="1" keyboard="d"/> <action name="moveforward" onPress="1" onRelease="1" retriggerable="1" keyboard="w"/> <action name="moveback" onPress="1" onRelease="1" retriggerable="1" keyboard="s"/> <action name="mouse_rotateyaw" keyboard="maxis_x" /> <action name="mouse_rotatepitch" keyboard="maxis_y" /> <action name="shoot" onPress="1" onRelease="1" retriggerable="1" keyboard="mouse1"/> <action name="quitgame" onPress="1" onRelease="0" retriggerable="0" keyboard="escape"/> </actionmap> </profile>
For some reason, my input will not execute when running via Visual Studio. I was curious if I'm missing something with registering an action? Or if this is a bug?

Re: 5.5 Input Action not working

Posted: Mon Aug 27, 2018 7:28 am
Ahh Nvm ... solved my problem within a few minutes. Just launching Local WIndows Debugger doesn't necessarily build the 'Game' solution. building that made the input work.