Announcement

Collapse
No announcement yet.

Sharing variable between two blueprints

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sharing variable between two blueprints

    Hello, i am currently adding a jump animation to my character. And i need to share a variable between my character blueprint and my animation blueprint. How?

    The variable in myplayer blueprint looks like this: http://puu.sh/x1Gtk/dbad0d1800.png

    How do i get it in my other animation blueprint event graph?

    #2
    Why do you need to share the variable (create the variable in your character BP)? Instead you could get the anim instance, cast it to your animation BP, drag off "As AnimBP" and just set the variable that way.

    Comment


      #3
      Click image for larger version

Name:	get.PNG
Views:	1
Size:	24.6 KB
ID:	1132096 Use "Get all actors from class' and the "get". allows you to access custom events and variables

      Comment


        #4
        I assume the variable you have inside the character bp is called IsJumping

        Create a variable inside animBP called IsJumping too,

        Then go to the event graph, and from the try to get pawn owner drag off a blue pin and Cast to the Player character, and from the as player character drag off the pin and type in Get IsJumping

        Now right click and type in SET ISJUMPING, connect the two red pins from the is jumping variables, and then connect the exec pins.

        I will send a screenshot of this when I get home, if you'd like.
        Zombie Physics Hit Reaction: https://forums.unrealengine.com/comm...-dismemberment

        Advanced RPG Combat Template:https://www.unrealengine.com/marketp...ombat-template

        Comment

        Working...
        X