This is an actor blueprint. I want to be able to print its transform when I press ‘A’ but it doesn’t. Upon searching online I was told to use the Enable Input node. It still doesn’t work and I’m stuck with it. But, it does print the string ‘I’m alive!’ with no issues.
PS. I’ve also used Get Player Controller node (per tutorials online) and connected it to Enable Input and the error says: “This blueprint is not a PlayerState therefore target must have a connetion.”
The above wouldn’t work because you’re not enabling input in the actor, but in the actor’s owner. And since Self here targets a component and we’re inside an actor, it’s all really… not correct.
You want this instead:
But… you do not need any script to enable input in an actor:
You said this was an actor blueprint. It is not. You made a component. Components cannot process input. This explains the previous nodes.
Unless this is a brand new UE5 only feature I am not aware of. Afair you cannot even have input nodes in components. Not sure how you sneaked one in! UE5 I guess.
Hello, thank you for correcting me. You’re right, this is a component blueprint (didn’t know several types of BP exist!)
I made another blueprint (I’m hoping this is an Actor blueprint this time!). I found the Auto Receive Input and set it to Disabled. Keypress G is still not working!
Enable it. Once you do, you do not need the nodes. You will need to place the actor in the scene, of course.
Do note, that unless you’re just experimenting, learning or creating something uncanny, actor input should be Disabled. Input is something you handle in a Pawn or the Player Controller.
Sometimes you may want it enabled, foc. But imagine you had six of those actors in the scene and you only wanted to print the transform of 1 of them. Now you have a problem.
Thank you! It works now! (Initially it didn’t then I realized I also had to click on the environment first.) Cannot thank you enough! And thank you too for your additional tips!