I’ve been learning about enhanced Input.
Seems like a great thing with all the contexts and additional features it brings over the normal input mapping.
I am stuck at one part.
What I am trying to do is → Once a input action is triggered. I am trying to print something
I am trying to print a string for any event triggered (Triggered, Started, Ongoing etc etc)
Although the events are triggering as the character is moving to what is set in IA object.
I don’t see any of print string.
It might be something basic.
But due to very less familiarity with UE I am not able to figure this out.
Need some help in understanding why it is not printing a stringing action an IA event has triggered
Make sure you map the needed triggers (press, hold etc). I think they were in the mapping context in a collapsable config under the set ia. (Not at my pc atm)
Again trying to print if any of the input event triggers.
Now when I play it. And Press ‘A’ or ‘D’ my character no longer moves.
That verifies that my new IA_is getting fired now.
But I still don’t see any print string on screen or on log.
Where is the input? Is it in the character, player controller?
if in the character is it set as the default spawn character or are you manually spawning it?
Also is the controller set as the player controller in your game mode?
Is the character possessed correctly by the controller?
Also with the set key in your print string you will only get 1 line of information on screen.
If another print string has the key set to 1 they can cancel each other out.
Is your custom game mode set in maps & modes?
A test project to show running input modes inputTest.zip (169.6 KB)
What happened was, I created a 3D template project.
Created a new pawn BP template. And starting using some nodes there.
So, it was like once I was pressing play button in blueprint editor. I was expecting it to automatically use the Controller blueprint that I’ve written. Which is wrong. Actual behavior is, it will instantiate the player controller class defined in game mode BP.
So the over flow understanding is as per my current understanding is:
If we are making a new controller BP then we need to update that info under player controller class Option in Game Mode BP.
a) To find the current game mode blueprint we need to go to -> Edit -> Project Settings -> map & modes. There under default mode we will get current game mode BP in use.
If we are making a new game mode all together. And we want to update Default game mode and default player controller under map and mode. Location defined in step 1.a.
Once we have that it will the logic defined under our player controller BP will be triggered.
To brief: To make sure our Character controller is trigger. We need to check if we are referring to correct controller BP in Game Mode BP. And if we’ve created a new Game mode BP we need to check if we are using that in our maps and mode settings .
Thanks a lot!!
Now out of curiosity I want to check out player controller BP or class or interface. I can see by default this is the class which is used in default game mode. But when I hit play. We get object created from BP_ThirdPersonCharacter .
You can use the “GetControlledPawn” from inside of your player controller passing in a ref to self and print out it’s name and check in the outliner if it’s the same.
If it’s not set or invalid then you are not controlling a pawn.