Announcement
Collapse
No announcement yet.
Help with AI
Collapse
X
-
legacy-Quixzot repliedThanks for the reply. I'll definitely give that a try and let you know how things go. Thanks again.
-
legacy-OogleBoogleBah repliedYou can override Controller::SeeMonster() and Controller::SeePlayer() in your Bot class to start your attack state. Also in that function, set the Bot's Target, Enemy, and Focus to that enemy. Every so often in the attack state (every half second or so), you should call Pawn.Weapon.CanAttack( Enemy ). That function will check for range to target and other relevant conditions. If CanAttack succeeds, start firing by calling(Pawn.Weapon.BotFire(false)). If it fails, stop firing by calling StopFire().
Helpful?
Leave a comment:
-
legacy-Quixzot started a topic Help with AIHelp with AI
Hello All,
What would be the best way to have an enemy stay stationary in a certain area, then once the player comes within a certain proximity of that enemy, it will start shooting at the player until the player leaves the proximity, then the enemy will stop shooting? Suggestions?
ThanksTags: None
Leave a comment: