So I’m at the point of the Beat Em Up template where I’m starting to work on enemies going after and picking up weapons. So to keep this simple, I will just have them go after one weapon, a knife. They will go to, pickup and attach the knife, and then once they have it, if they are on or fairly close to the player’s X (horizontal) with their capsule component for TWO SECONDS, they will detach and throw the knife at the player, and if it strikes him it is an instakill.
I have assumed there needs to be what I’m calling the “object of interest” for the enemy.
Again, this will only be using one weapon for now, but I assume it will work like this in the end. So I first check if the enemy has any weapon, and if false proceed. Then I check if the knife actor is overlapping with the screen box, thus a weapon is present or not. If so I’m setting my X Y Z floats with the knife actors location.
Which ultimately feeds the main enemy movement mechanism.
Now here comes another Beat Em Up serious question…How do you decide which enemy goes for the weapon? And which weapon? And once ONE enemy goes for the weapon, the others do not? hahaha
Now we come to the question of this thread…in the video you see both of the first two enemies go for the knife, and when they get there, they both reach down for the knife, it obviously attaches to the first one that got it. Then after the two seconds on X, they BOTH throw a knife. You might not be able to tell they are both throwing a knife in the video but they are. But I don’t get that, the two enemies don’t act like instanced copies.
Here is what I done, I have just one Enemy001 BP (which is already very complex and it is not even done yet) which was dragged into the world and placed and rotated, and from that all the others are clones of that one.
Yet, in this case they don’t act unique. And there are other cases where they act too much like one. Walking so closely to each other they sometimes merge into one enemy and it look like there is just one but there is actually two there. Which means when the TPC gets punched every one of there punches is actually two.
I figure it may be that I didnt actually use seperate blueprints for the enemy, and while I did do that with the miniboss, I did not want to do that with the enemies as I wanted to have one enemy bp really good before I cloned it and made others with some slight changes.
Check if TPC Capsule X in range compared to Enemy’s capsule.
And before I forget, you probably want to see how I attach the weapon.
As always, any insight or wisdom about what is going on here is greatly appreciated thanks!