C++ AI controller

I would like a guideline to create an AI controller.
I searched the documentation not found a more content to show in C + + to create an enemy in C + + with a humanoid.

Hey rodrigoportfolio!

You may want to look into creating a custom character base class with logic available for generic characters,
then make child classes overriding simple functions like Attack, etc.

Then for general controlling of the character, create an AIController which interacts with the base character class,
meaning you have 2 classes:
An AIController, which interfaces with your Base character, with specific logic in the child character class.

Everything you would go about doing would be as logical as you yourself can be towards any situation an AI would be in.

If you want info on every available function/variable in ‘ACharacter’ and ‘AAI’ then check these links:

  • ACharacter
  • AAI
    If there’s something that isn’t in those classes that you think would be basic enough to be in them, you’ll probably find them if you search up through the class hierarchy.

I know it’s not much, but at least it’s a good starting point.

I’m not sure if there are any solid tutorials out there for AI, but everyone is still in the learning phase.

So have a look at those links, try come up with something that is close to what you want,
and then the kind people here will probably try everything in their power to help you get further with it!

I hope this helps!

-

Most times I dive into the AI functions feeling like “I’ve got it” my result usually involves breaking to look for a…refreshment. Since few AIController questions get much attention, I think many of us might be still wrapping our heads around it. Course, many games may not require much besides pursuit only style AI.

Know the UE team is working hard on getting the blackboard out of experimental, and documentation along with that. Suspect when that happens we will see a lot more chatter on the topic. Given how much of a bear AI can be in general, somewhat shocked there isn’t more talk about it yet, but maybe that’s just due to such a variation in AI needs from most games.

That said, I’ll be passing out imaginary internet respect points to any tidbits others find and share with us :wink:

Hey !

Myself and my teammates are working on generic AI systems that can be controlled through blueprinted classes,
which will hopefully cover:

  • Melee
  • Ranged
  • Magic
  • The ability to switch between styles, etc.
  • Climbing (Quite difficult, especially with no spline actors existing at the moment)
  • Loot Drop Systems, etc (This one’s fairly easy! Pass a BP to be instantiated on death)

I’m hoping if we make enough of a generic template, that others can use it as a tutorial!
Should be working more on it in the next few weeks, and then we will make a Wiki page for it.

-