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"

Unable to fetch Player BP bools from Animation BP

I'll just get right to the point.

Attached is an image of my Event graph inside my Animation blueprint. I think for the most part it will work, the issue is that I cannot test it because my Try Get Pawn Owner call is not returning a valid AnimInstance. I've tried other functions and always end up with the same result, to name a few (Get Player Pawn, Get Player Character, Get Owner, etc).

I've look at sample projects as well as other problems of a similar nature and haven't been able to come to a fix. If there is an alternative to reading boolean variables from my C++ class and using them to throttle states in the Animation Blueprint as opposed to this, I would greatly appreciate a pointer in the right direction.

Some additional information:

  • My game mode is set correctly in the settings with default pawn set as the CharacterBP

  • My Character class is written in C++ and the blueprint is derived from it, game mode is NOT (I suspect there is a complication character)

If there is more I can think of over the next day or two I'll update this question with any other information and be checking back periodically.

Cheers alt text

Product Version: UE 4.16
animbp.png (266.9 kB)
more ▼

asked Jun 18 '17 at 01:45 AM in Blueprint Scripting

avatar image

16 2 3 6

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

1 answer: sort voted first


my guess : check what asset you are visualizing, it's probably the preview object for the animation blueprint.

The preview object doesn't have any pawn attached obviously, as it's not ingame and attached to an Actor.

Also, check your pawn bp, it's SkelatalMesh should have AnimationBlueprint defined as animation mode, and said AnimationBlueprint defined as the value.

more ▼

answered Jun 18 '17 at 06:49 PM

avatar image

1.5k 14 18 33

avatar image Subzero254 Jun 18 '17 at 08:24 PM

Yea since I'm keeping my scope small I am still learning things, I didn't know about the visualizing aspect of the anim bp. It is set to preview or no debug instance.

I double checked my character bp as you suggested and found my animation blueprint however it wasn't strictly char_anim_bp, the name listed is char_anim_bp_C.

Perhaps this info can help assist anyone if they needed more info, I can also provide more.

avatar image Firefly74 Jun 19 '17 at 08:23 AM

Ok, So, are you in simulation with said pawn spawned when you try to check it's bp ?

Simulation mode have to be in editor ( either "selected viewport" or new editor windows" ) to be able to live check the data .

_C mean it's the compiled version of the blueprint, so that's normal :)

avatar image Subzero254 Jun 19 '17 at 09:06 PM

So what your saying is that I need to remove my PlayerStart, place an instance of my Player_BP into the level and then in the visualizer component select that BP and then Fetching the pawn will work?

I'm going to try some more while I wait to hear back, I am unfamiliar with how to get sim mode to work and was planning on looking up docs at some point.

Edit: Just tried to PIE test with different debug filters set. When dragging another instance of my BP I don't play from it, I play from the cameras position. Still not able to fetch the owner however I feel like I'm getting closer.

Didn't think something like this would be so difficult, but thanks for your patience and replies

avatar image Firefly74 Jun 19 '17 at 09:39 PM

No, you should keep your player start, as long as the good player blueprint is spawned.

When you are in PIE, simply go to your anim BP, and instead of preview, you should be able to select the one from your unit . To get your mouse control back without ending the simulation ( world should still play ) , you can do shift+F1

if ever you still don't have the choice of the AnimationBlueprint instead of "preview instance", there might be a wrong setting on your unit blueprint. Choice should display something like " SCharacter_AnimBP_C_0 in yourUnitBP"

avatar image Subzero254 Jun 19 '17 at 10:14 PM

Ok so after escaping PIE and changing my anim BP's debug filter to the pawn BP, the execution flow appears to be working correctly.

However I'm still unable to see the simple jump animation play when I jump. Are the values not being read? My flow was fetch bPressedJump from C++ --> assign in AnimBlueprint to isJumping? and that is the rule for the transition state.

avatar image Firefly74 Jun 20 '17 at 08:02 AM

ok, good ! :)

Can you right click on the PressedJump ( in the anim bp you showed at the begining, and select "watch value" then do the simulation thing again;

this will show us the value of the variable durring the simulation, to check if the problem comme from that or not

avatar image Subzero254 Jun 21 '17 at 05:57 AM

I apologize for the late response, busy day. So thanks for basically teaching me how to debug blueprints, everything appears to be in working order now.

My problem was assuming MyCharacter class was able to read bPressedJump which I assumed was inherited from the base parent Character class, I watched my other values and saw they were responding correctly.

I really appreciate the help and the responses, I usually don't have much faith in forums/hub but hopefully that changes, Cheers!

avatar image Firefly74 Jun 21 '17 at 07:41 AM

No worries ! You might not always get answers but most of the time yes :)

Have a good day !

(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