The Boar will begin the level walking to random Path Nodes while its Hunger meter increases (at the rate you set). When the Hunger meter is full, the Boar will become hungry, increasing it’s speed while it searches for Actors with an Enemy Tag. When an Enemy is discovered the Boar will chase it down and the Stamina bar will begin to decrease (at the rate you set). When in range the Boar will attack the Enemy and feed; feeding will fill the Health bar and reset the Hunger and Stamina bars. If the Boar runs out of Stamina then the Boar will need to rest and abandon the hunt to regain Stamina.
The Boar will hunt any Actor with an Enemy Tag, but if an Actor without an Enemy Tag damages the Boar, that Actor will become top priority.
If you hurt them they will hunt you down. So beware…
Attack Animal: Boar is easy to set up - just drag and drop some Boar Path Nodes into your levels, drag in some Wild Boar, and add an Enemy Tag to any actor you want these Boar to hunt. It’s just that easy. [RIGHT]
yes indeed you can. You need to swap out the Skeletal Mesh and Animation Blueprint. There are also a few references in the AI Controller to swap out. The attack and rest animation montages need to also be swapped out in the Behavior Tree.
I want to put sounds in for my project like when the boar is hunting and attacking it is squealing and when it is just roaming around it is just grunting. Can you maybe assist me in where to put in these sounds. I already have these sounds, just do not no where to put them. Thank you in advance and have a great day. Kind regards.
Can you please post a guide explaining which exact nodes and variables need to be changed in order to use this with our own custom characters. I set up the "am i alive? boolean, and changed some casting nodes in the behavior AI tree, and I can get the boar to attack when its hungry, but it’s not patrolling between the target points or attacking my birds(your other pack) consistently. So it kind of works, but it’s not great so I feel like there some other nodes that need to be changed or something. I want to buy the ducks and drop them in here as well as the rodents, but want to get this working perfectly first.
I’m looking into this right now, update to come soon https://forums.unrealengine.com/core/image/gif;base64
Ok, i found the issue that you are having- its a very easy fix.
the problem is the Boar and the Birds are using 2 different parent classes, they need to use the same one. The Fix- Go to the Parent class Folder in the Birds Folder- open the “BP_NPC_Bird_Base” - Click on the Parent Class, you will see that there are 2 “BP_CharacterBaseWithHealth” Select the one in the Boar folder (you can see the file path by hovering your mouse over the little Icon to the left of BP_CharacterBaseWithHealth), save and compile. that should get you up and running.
They both need to use the same Parent class so that the Boar can see if the Bird is alive or not.
See the attached image.
Yes, that is correct, they need to use the same parent class so they can see that “AmIAlive?” Bool. So with the Ducks and Rodents follow that same step in the image. It doesn’t matter which parent class you use (they are all the same after all) just that they all use the same one. I may push that Bool to the Blackboard in the future. The only problem there is keeping things understandable for newer users. we’ll see. But for now that is all that is needed for the Boar to hunt everything. Also double check that the “BoarEnemy” Tag is in place on any animal you want to be hunted by the Boar.
I’m currently almost done with Pigs- which has herding behavior (Leader and follower pigs). Then I’m getting to Attack Animal: Wolves- these will be pack hunters. Bears will also be an Attack Animal but that will be in the distant future. I can also see Deer, Goats, and Sheep on the horizon as well.