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"

Better Way to Set This Up & Fix Editor Errors?

Below is located inside my CharacterBP.

My character uses Root Motion and right now, this BP setup will mean I can:

  • Tap WASD and a start animation will play through without interruption.

  • Keep holding WASD or proceed to press and hold WASD during anytime of the start animation to keep going to locomotion.

  • Release WASD to play a stop animation without interruption.

  • Then blend back into Idle no matter what.

Basically the HoldMovement bool will assure the proper start or stop animation plays (what is pressed or released will set the animation) no matter after the fact how the player pushes WASD.

alt text

What I want to be able to do is:

  • Break out of start animation to go back to idle.

  • Break out of stop to go back to locomotion.

  • Break out of idle faster and not force it to play after the stop animation has played.

How can I achieve this by setting up correctly my CharacterBP?

The errors this gives inside the editor are:

Accessed None trying to read property K2Node_DynamicCast_AsAnimBP from function: 'ExecuteUbergraph_AnimBP' from node: SetMoveForward in EventGraph in AnimBP

There is some error with the set Move and User vars

Product Version: UE 4.11
asdfasdfasdf.png (294.3 kB)
more ▼

asked Nov 10 '16 at 07:32 PM in Blueprint Scripting

avatar image

8 5 13 17

avatar image gogogad Nov 10 '16 at 10:17 PM

Basically "Hold Movement" bool is true when I ENTER start phase "Hold Movement" bool is false when I EXIT stop phase

UserForward & UserRight are the last known values of MoveForward & MoveRight so start and stop can play the correct animation when WASD keys are pressed (for start) and released (for stop)

MoveForward and MoveRight will update locomotion direction and will not change or affect starts and stops. These vars are clamped inside AnimBP to play the corresponding animation inside the blueprints (since I am using root motion to drive speed and such, blendspaces use MoveForward and MoveRight x and y axis values from -1 to 1)

How can I add to this CharacterBP setup so that:

-pressing WASD

  • when idle is playing after stops, break to starts

  • during stops, move back to locomotion

-releasing WASD

  • during starts, move back to locomotion

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

1 answer: sort voted first

Drag a node from the bottom Cast and type isValid.

Place the isValid check in front of set MoveForward.

Connect IsValid to set.

The error means: You are trying to set MoveForward variable on NULL reference.

more ▼

answered Nov 10 '16 at 07:43 PM

avatar image

1.2k 31 8 32

(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