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"

Held buttons are not detected when changing states

Hey guys, I have this kind of working but I feel like I'm doing it inefficiently, or I'm missing something. It's not working exactly the way I'd want.

I've set up a state machine on my first person arms, which looks like the image below - this is in my First Person viewarms Anim BP. Also in this Anim BP, I'm casting to the Player Character BP in the Event Graph and grabbing the status of some booleans to set the different states here. For example, Right Mouse button pressed sets "isAiming" to true, which puts us into ADS_Loop, etc.

alt text

Here's what I'm trying to solve: I am aiming down sights (ADS) with right mouse button. I am moving, so I'm in the state ADS_Walk_Loop. Looks great. I press the LShift to sprint, but nothing changes, because in my Right Mouse button "Pressed" pin I've set a boolean "CanSprint" to false (it resets to true on "Released"). If let go of the Right Mouse button, with LShift still held down, I am still just walking. What I'd want is for the system to pick up that I had LShift held down, and automatically put me into sprint when I release the Right Mouse button.

I feel like I'm not tracking my inputs correctly or I'm not capturing them in the right place in my Player BP. Has anyone else encountered this or achieved what I'm describing a different way? Any help or advice would be much appreciated!

Product Version: UE 4.16
states.jpg (387.9 kB)
more ▼

asked Feb 17 '18 at 11:27 PM in Blueprint Scripting

avatar image

26 1 1 5

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

0 answers: sort voted first
Be the first one to answer this question
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