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:
Then on the Event Graph I added this:
and on the Anim Graph I added this:
but it doesn’t work.
define it as input not output.
this is not blueprint interface
This is the function of the BluePrint Interface:
This is the BluePrint Interface:
This is my Character BluePrint:
This is my Animation BluePrint EventGraph:
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.
Anim BluePrint EventGraph (I can’t see the green text on the screen with the Print String function):
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.