hi guys i have proplem where my enemy attack montage stopps when the player attacks him and he just playing hit reactions and not attacking him back so the reactions montage stopps the attack montage of the enemy
Hello,
Video please.
Also, blueprint screenshots.
sure there is it see how the reaction animation is stopping him from attacking again
Playing montage is meant to interrupt other animations.
If you don’t want it to interrupt another one,you could find the node,which is called “is montage playing”I guess?i didn’t use it though.
tried it already didnt work
Can you retract the sidebars so I can see what the code is doing?
I can’t see anything because the sidebars are covering your code.
Also, it looks like you have a LOOP in the second photo, and that loop keeps checking “Isattacking” to TRUE, which will make the enemy think that you are constantly attacking it.
But again, I need you to pull those sidebars so I can actually see your code.
ok one min
Yeah, you have an infinite loop.
Look at the bottom photo:
You have “Can_attack” being set to TRUE, then when the montage plays, it checks for “Can_Attack”. “Can_Attack” will ALWAYS be TRUE until your character gets far enough away from the enemy.
ok how do i fix this
It’s hard to tell you what to do because I didn’t make your code, and my suggestion could break something you did somewhere else.
Does that make sense?
Just so I am clear, your PLAYER CHARACTER is the one who is looping the HIT REACT?
look i took back the loop thats after the last branch in the bottom picture and fixed it there is only one proplem now the loop is for enemy to continously hit the player so when i took it he only hit him once what should i do to continualy hit him without aloop
The problem is once your attacking montage got interrupt,it never go to the line setting the attacking Boolean to false,so it will be attacking forever.
You could try dragging a line from the on interrupt out pin to the set attacking
ok
Did it work?
If not, post another video and screenshots so we can see what you changed.
it worked but the enemy does not attack continusly how to make it attack continusly
Please.
ok one min