Download

Global variable on the Anim Graph

Hi, I created a string variable on the Character BluePrint, that says what weapon is using the player. The problem is that this variable can’t be used on the Animation BluePrint to handle a specific animation when the player is using a certain weapon. What I have to do to use this variable on a condition on the Anim Graph?

create blueprint interface, from the content browser,click on new, then choose miscellaneous → blueprint interface.
open it, then create a function after that define the variable and save it, then you have to go to your char blueprint, and add the bp interface from blueprint props, and you need to
set the variable to the bp interface function, and then go to the animation blueprint to add bp interface, the same way as in your char bp and call the function.
i hope you understand what i am talking about :D, because I am so bad at explaining things

I created the BluePrint Interface, and I added this output variable:

http://puu.sh/9Uinc/f2c594a22b.png

Then on the Event Graph I added this:

http://puu.sh/9Uita/467c6777db.png

and on the Anim Graph I added this:

http://puu.sh/9UiwU/0195727356.png

but it doesn’t work.

define it as input not output.

edit:
this is not blueprint interface

This is the function of the BluePrint Interface:

http://puu.sh/9Ujh3/9b13c4d93e.png

This is the BluePrint Interface:

http://puu.sh/9UjlJ/5d3e99831a.png

This is my Character BluePrint:

http://puu.sh/9Ujp2/5a5c7ef0af.png

This is my Animation BluePrint EventGraph:

http://puu.sh/9UjtZ/6203c0061f.png

in the animation blueprint call the event of global variables not the function and remove the output from the global variables just keep the input

watch this Unreal Engine 4 Tutorial - Fuel System (Pickup/HUD) - YouTube from 3:20, he will explain how to use the blueprint interface

I did it, but it doesn’t work.

Character BluePrint:

http://puu.sh/9UlC8/99e5aea8a0.png

Anim BluePrint EventGraph (I can’t see the green text on the screen with the Print String function):

http://puu.sh/9UlGL/5b4107e1c3.png

because in the animation blueprint the print string function didn’t connect to any event, that’s why its not showing anything.
try to connect it with event blueprint update animation.

I tried to do it, but the string isn’t printed, because it’s empty. I tried to replace to variable to the “test” text, and if I replace it with this text, it works, but only with the Event Blueprint Update Animation, so the Event Global Variables isn’t handled.