Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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


Product Version: Not Selected
more ▼

asked Oct 02 '14 at 12:03 PM in Blueprint Scripting

avatar image

90 9 15 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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).

more ▼

answered Oct 02 '14 at 12:27 PM

avatar image

5.9k 291 86 293

avatar image sgtfluffybutt Oct 02 '14 at 12:41 PM

I'm confused here. I'm not really sure what you're asking me to here.

I went ahead and connected a "Get Player Controller" but that doesn't seem to enable input.


avatar image Erasio Oct 02 '14 at 12:44 PM

Well your ComponentHit isn't hooked up to "Cast To Box" so it certainly won't do anything at all.

Also Enable Input only allows Key events to be received by that actor. You have to implement walking, jumping and all that by yourself if that's what you're trying to do.

avatar image sgtfluffybutt Oct 02 '14 at 12:53 PM

I didn't even notice that...

Oh. What I'm trying to do is enable the cursor so I can click restart when I'm dead.

avatar image Erasio Oct 02 '14 at 12:56 PM

Then you might want to check out the HUD level inside of the content examples project from the marketplace.

Since this is not related to your character but instead should be a message and a button in the HUD which pops up when you're dead :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question