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"

Can I have multiple action mappings for one key?

I'm seeing an issue where if I call BindAction for two different mappings but using the same key. The second mapping doesn't seem to fire.

So if I have a mapping for "Mouse Down" that's set to Mouse Button 0 and then in BP I use Event Mouse Button 0 it doesn't seem to fire. If I try using "Mouse Down" in BP instead of "Event Mouse Button 0" it doesn't fire either. It appears that the first even is "swallowing" the input.

How do I fix this?

Product Version: Not Selected
Tags:
more ▼

asked Jun 16 '14 at 05:21 PM in C++ Programming

avatar image

omskillet
221 17 19 159

avatar image DJMidKnight Jun 16 '14 at 06:03 PM

Can you show a screenshot of your blueprint, project settings input screen and the section of code for the bind?

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I ended up fixing this myself. There was a combination of things.

First of all I was using a derived player controller. I had Action Mappings for Pressed and Released in my C++ Controller and was checking the same key in my Pawns Blueprint in some other script.

Turns out I needed to call "Enable Input" on my controller when Begin Play happens on my Pawn. I also needed to set bConsumeInput to false on the mappings I made in the player controller. Took me a minute to realize that BindAction returns you a data structure in code that you need to set bConsumeInput on. In BP this is just a checkbox. I would like to request that Consume Input be a parameter of BindAction or BindAxis. Would have saved me 5 hours.

more ▼

answered Jun 18 '14 at 11:11 PM

avatar image

omskillet
221 17 19 159

avatar image FacePalm.exe Oct 21 '14 at 03:38 AM

Cheers for this, saved me a few hours. :)

EDIT: Sorry for killing the resolved status of this.

(comments are locked)
10|2000 characters needed characters left
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