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"

Input axis returns 0 in Blueprint function, but works in EventGraph

When I set up the following in the EventGraph of my Controller Blueprint, it prints out the value just fine: alt text

However, if I instead create a function like so and then call that, Get MoveX always returns 0: alt text

This is the only place that MoveX is accessed, and turning 'consume input' on and off does nothing.

I feel like I must be missing something incredibly basic here, please help me access my axis inputs from inside a blueprint function.

I should also note that I cannot pass the value from the EventGraph to the function directly as this function needs to be called from another blueprint.

Product Version: Not Selected
printx.png (24.3 kB)
more ▼

asked Jun 13 '14 at 08:29 AM in Blueprint Scripting

avatar image

278 16 23 30

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

1 answer: sort voted first

The way I was able to resolve this was to access the input axes in the EventGraph first (I just print their values on beginplay), which seems to initialize them or something which allows them to be used inside functions.

alt text

Seems like a bit of a hack, and I would like to understand why I need to do this, but hopefully this helps someone else who got stuck.

init.png (53.9 kB)
more ▼

answered Jul 27 '14 at 09:17 AM

avatar image

278 16 23 30

avatar image RocknRolla Aug 24 '14 at 07:43 AM

Dammit I spent two hours yesterday trying to find out what was wrong with my blueprint. When I figured out through debugging that my all my axis return 0, I almost instantly found this post... So, same solution here: had to move getting axis values to event graph.

avatar image miracle7 Apr 08 '15 at 10:01 AM

This no longer seems to be an issue in more current versions of the engine, but I guess this is the solution if you are working in a version before it was fixed.

(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