Can't call another BP function in AnimGraph with PaperZD

Hi Everyone, I was following this tutorial: https://dev.epicgames.com/community/learning/tutorials/OkmM/unreal-engine-how-to-make-a-2d-top-down-game
Everything is fine but one little thing.
I created a blueprint with PaperZDCharacter as parent.
I added a function ‘IsStuck’

I created a paperZD AnimBP and got a reference of the character BP
(the local variable ‘IsStuck’ is a workaround i’ll explain in next image) :

After that I supposed to call the function ‘IsStuck’ in the AnimGraph:

But i can’t. I can use the reference to ‘TopDownChar’ to get the variables, but I cant’ call function ‘IsStuck’ that i created. I Can call it from EventGraph, that is the workaround i used, created a local variable and set it in EventGraph using my function (you can see it in second screenshot) and even in ReceiveNotify function of PaperZdAnimBp but not in AnimGraph.

I can’t figure out why. Maybe i miss some scope in function?

Hey @ilbelon!

So you need to change that “IsStuck” function to a PURE function. (that’s the green ones)

So highlight it in the side bar, and in the details panel there will be a checkbox for “pure function?”. You’ll check that, compile, and then you can call the function on your Paper2D animgraph!

1 Like

@Mind-Brain thank you a lot for the very fast reply!

I just tried (it works!) and then checked documentation and found what Pure and Inpure functions are!

Thank you again! :smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.