x

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"

Why I cannot get Input Events?

I have these setups in blueprint of a pawn:

alt text

alt text

alt text

However, the input event is not triggered. Why?

Additional info: I have a actor just have a camera component and it is assigned as the default pawn in the game mode.

Video Demonstration Link

I know it crashes at the end. No problem. After I relaunched it, I could not get the inputs again :S

Product Version: Not Selected
Tags:
details.png (23.6 kB)
beginplay.png (51.8 kB)
more ▼

asked Jul 31 '14 at 10:28 AM in Blueprint Scripting

avatar image

ErayT
250 36 37 169

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

2 answers: sort voted first

@EaryT

Like Jacky said, you cannot feed the input to more than one Pawn at the same time. A controller can possess only one Pawn and only that Pawn will get the inputs.

In your second picture, if you look closely, you are calling GetCotroller on a pawn and then calling Posses with the same Pawn. The problem is if your Pawn (an instance of that blueprint) was not already possessed, the function "GetController" wont return a valid reference. So that BP event graph ends up doing nothing.

If on the other hand, if the Pawn was already possessed, you re-possess it to the same controller, still doing nothing.

I am not sure why you would need to do it this way, but instead of using Pawn->GetController, try using GetPlayerController node. and feed its output for possession target.

But like I said, if you include the camera inside the Pawn as a component, there is no need for all this.

more ▼

answered Jul 31 '14 at 02:00 PM

avatar image

mindfane
3.4k 154 52 271

avatar image ErayT Jul 31 '14 at 02:05 PM

Ok. Thank you so much! I began to understand the way of using player controller. :)

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

Make sure you have your own version of PlayerController setup too (if you started his project based on a starter kit). Inside the GameMode blueprint, set this controller as default one.

In this case you wont need to posses the Pawn manually. All this can be set in the default properties panel.

more ▼

answered Jul 31 '14 at 10:42 AM

avatar image

mindfane
3.4k 154 52 271

avatar image ErayT Jul 31 '14 at 11:01 AM

You mean I need to create my custom player controller and do no change in it so that it will be able to get the inputs. How? and Why? :)

Actually what suppresses it not to get the input events?

avatar image mindfane Jul 31 '14 at 11:05 AM

None that I can see.

Check your Key bindings too. And add a print_string right after the Input Axis event and see if it gets fired. Oh and try removing that manual possession.

avatar image ErayT Jul 31 '14 at 11:10 AM
  • There is no problem in key bindings.

  • It does not get fired I can see that by just looking at the line connected.

  • I added that manual possession just after I tried it without it. :)

avatar image mindfane Jul 31 '14 at 11:12 AM

For testing , try creating a new PlayerController BP directly from the editor and assign it as the default controller. Lets see what happens now.

avatar image ErayT Jul 31 '14 at 11:15 AM

Nothing changed. Why it does not work!? :S I really cannot understand thee structure of the gameplay mechanism. I cannot figure out how those mechanisms work. :S

avatar image mindfane Jul 31 '14 at 11:20 AM

Its quite simple, really. You might be missing something very simple. Give me a couple of hours and let see what we can do. In the meantime, please show me the screenshots of your Game and Map settings, GameMode properties, and your Pawn's proeprties

avatar image ErayT Jul 31 '14 at 11:46 AM

I have added a demonstration showing the whole process. You should check it ;)

avatar image Jacky Jul 31 '14 at 01:17 PM

Why are you creating a different pawn for the camera? Currently you are possessing the camera pawn and thats why the other pawn is not receiving input.

avatar image ErayT Jul 31 '14 at 01:45 PM

I know. If you look at the 2nd picture, I try to control that pawn via possession. In the video there is no possession as 'mindfane' suggested. However, at the beginning there was the possession of course ;)

(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