AI attack only when attacked
Hi guys, i am a new user of UE4 and i am trying to figure out how can i make my AI bot to start attacking (punching) only when being attacked (punched) by my character. Here's my behavior assets As you can see i have set some tasks (BTT) for the bot and to be more specific here is the configuration of the two persumably assets that need to be adjusted in order to do the above mentioned:
BTT_botMovetoEnemy and BTT_botAttackEnemy
All answers are appreciated. Thank you, in advance !
asked Sep 12 '15 at 12:29 AM in Blueprint Scripting
Looks like you need some kind of a value (can be a bool) which gets set when the player punches the AI. This bool can be directly linked to some value on the blackboard. Now in the behavior tree check for this value and start attacking the player (if the player is still in range).
Basically the high level steps would be :
This is just an overview of how u can probably do it.
Follow this question
Once you sign in you will be able to subscribe for any updates here