Trying to enable input, getting a mismatch
Beginner here so I don't really know much yet.
So far I have the game work when you hit a box you die and another box comes on the screen so you can click it to restart.
I have the box come on the screen but I need to enable input to be able to click it. I looked in the blueprint_hud level and I see that I have to put the player controller to self. In my blueprint it comes up with a mismatch and I'm confused as to why.
Here's a print screen to show what's happening
You are doing so inside of your Player character.
Unreal splits all functionality into several sections.
The GameMode and GameState for overall logic (like total kills in a team and such).
The HUD for buttons and visual feedbacks of the gamestate, your character, etc. HP bars belong here as well as pretty much every type of feedback your player should receive.
The player controller for inputs and checks (for example transmission for an "open door" event on a button press or in an RTS the selection box for all units within it).
And the player character which is the skeletal mesh and representation of your character ingame. Here should be all animations, HP, Hitbox and damage functions.
You now try to input a "Character" type wire into a "Controller" type slot which can not work.
To get the owning Controller class use the node "Get Controller" if you are inside of your character blueprint.
If you want to do this for other actors you will have to use the "Get Player Controller".
The main difference between the two is that the "Get Controller" will only get the owning controller no matter if AIController or PlayerController while "Get Player Controller" will take an additional input for which one you want to get (in a singleplayer game you won't ever have any problems with this since your player will always be 0).
answered Oct 02 '14 at 12:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here