Best Practices for Local Multiplayer vs AI?

Hi guys,

I’m currently working on a local multiplayer brawler prototype (think Castle Crashers in 3D) and I’m very green on the behaviour tree/AI systems in UE4. So hopefully one of you fine people can help me with some pointers and best practices, maybe a little event graph or 2.

Ideally, I’d like to make a simple AI that does the following:-

  1. Idle
  2. Find the closest player
  3. Attack (with some pausing/repositioning/blocking/etc.)

In the future I’d like to evolve this to something a little more complex:-

  1. Idle
  2. Find the closest player
  3. Move to “stalk” range
  4. Decide to attack if there are less than 2 AI attacking the current target
  5. Decide to move to another target if there are 2 AI attacking the current target
  6. Move to another target if I am stunned/fall out of “stalk” range

Any help will be greatly appreciated. Thanks in advance!

KB

Have you seen the “Behavior Tree Quick Start Guide” in the Epic Wiki? I think its pretty fine to get started with behavior tree and stuff: https://docs.unrealengine.com/latest/INT/Engine/AI/BehaviorTrees/QuickStart/

Except for your attack-task: I think (for what I know now, I’m a beginner, too) its a bit more complicated to get the AI to reposition itself. The pausing and blocking etc. I would do as an animation, not as a task in a behavior tree (I’m not into animation yet, so I can’t help here, sorry!). So the pausing and blocking is only a damage calculation thing, hand in hand with the animation. But its more simple to start with the blueprint part, and add the animation afterwards I think.

Hope it is correct what I told you here, and it helped at least a bit.