Announcement

Collapse
No announcement yet.

How to communicate between AnimBluePrint and Character BluePrint ( Of the same char )

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

    How to communicate between AnimBluePrint and Character BluePrint ( Of the same char )

    I'm trying to learn how to make a character ( with a skeletal mesh ) to function as a melee enemy, so i want that at the moment it get close enough to the player it changes animation to attack animation .

    I check the distance within the character blueprint and when the enemy close enough i want it to change a bool variable which is in the animblueprint of the same enemy .

    https://docs.unrealengine.com/latest...mms/index.html
    I'v tried to follow this guide but i didn't work for me...

    This is kinda funny that i cant find how to communicate between two blueprints that are on the same character .

    Just for you to be sure, I'v chosed the AnimBluePrint asset from the content browser in the character blueprint details, otherwise it would't play the default animation from it .
    Why cant i just add something within the character's blueprint graph editor that connects me to the animblueprint that seats on the same character ?!
    Last edited by Sahkan; 05-03-2014, 03:27 AM.
    Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

    #2
    Hi Sahkan, I think what you need to do is cast from the characterBP to the animBP.

    set up a bool variable in your character BP and do whatever logic it is to set this.

    set up a new bool in your animBP and use a cast from the character BP to set this new variable (this is in the event graph of the anim BP). This is how I did it to set a vector variable on something:
    Click image for larger version

Name:	animEventGraph.PNG
Views:	2
Size:	55.6 KB
ID:	1050429

    Note that in this example IKLocation and EffectorLocation are essentially the exact same thing its just that one variable exists in the character BP and the other in the anim BP

    now you have a variable in your anim BP that you can use for whatever you want!
    https://barrylowndes.artstation.com/
    http://www.brokentotem.com/

    Comment


      #3
      Thanks bazmod ! It worked !
      Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

      Comment

      Working...
      X