How do I BPI pass a variable in Anim Notify to Char BP? [How to Hit trace in Anim Montage]

@illspiritx @Rev0verDrive ok thanks for the replies.

  • [I’ve been reformating my code to post. Encountered a problem, so I made a new thread on that specific topic (it also shows my setup pics for what I explain below).]

How do I split AddUnique array - to Play Anim Montage once per index?

@illspiritx made good points to consider. So I will clarify what I want to do:

  1. I have 90% of the Attack code in Player Character BP (while AI character is a child, thus uses the same logic).

  2. I want the brain/logic driven by the Player’s CharBP - meaning when I press a key, it triggers the code in Player’s Char BP (not AI BP).

  3. The reason is that I am using a DataTable to set 10 vars related to the Player’s anim montage to play, the Target’s reaction anim to play, the distance required, etc.

  4. But for #3 to work in my Player’s CharBP, I have a Hit Target var, which I need to set.

  • Update: I no longer wish to get this Var from the constant Tick-Hit [Notify State] (that is in the Anim Montage of my Player’s attack)
    ** old: From NS, I used to wish to pass the Hit target Var > to my Player’s CharBP >
    ** then I pull the same DT row (that chose the Player’s anim montage) >

    ** to get the matching Target reaction montage > and thus [Play Anim Montage] on Target enemy, from within Player’s CharBP code.
  1. #4 is very complicated and my CharBP is getting slower to compile, save, make backup copies. Thus I wished to use the NS hit code to Compartmentalize my code changes (makes it easier to backup, duplicate a NS asset instead of CharBP).
  2. But [Pro to put the Hit code in CharBP]: @illspiritx is correct about “adding new notify states would just be a matter of duplicating and changing the attack type var.” Now I use DataTable to feed the different Hit Bones to use for each attack > into the Hit function in CharBP [Pic 6].
  • But [Con to have one NS that handles all, and ‘change attack type’]: Is that I dont know how to feed the [NS tick Function] a variable? “Received Notify Tick” is an Epic Function, and they dont let me add Input pins?

  • Update: now I need to know how to BPI send a Var from CharBP to NS?
  1. Update: I posted my code pics at the link above. I’ll paste here for ease:

[Pic 0 below - the BPI setup now]

[Pic 1 - Anim Montage contains the Anim Notify State duration]

[New method: Pic 2 - ANS that calls BPI Event in CharBP - no var transfer needed, just call Event.]

[Pic 5 - CharBP where BPI event was triggered to start by ANS]

[Pic 6 - Hit function]