How do I set up an AI skill system?

In blueprints, I want to setup an AI skill system where the boss chooses skills based on priorities and cooldowns. I have no clue where to begin. I’ve used Behavior Trees to start the process of them moving and attacking and I’ve got them randomly choosing skills too. But having the skills interact in any way seems really confusing.

Anyone? Please?

/bump please

You should read this :

Ai is really confusing. :wink: It takes a long time to tune as well, even once you have your system set. But, it’s fun.

It sounds like you are on the right path with using Behavior Trees. Make use of the Blackboard, set those cooldowns and priorities using service nodes and conditionals that check on those variables. Start with one, before putting the rest in. If you have problems getting that one specific one to work post a question on it here, or in the Behavior Tree threads on the forums, there are a few going.

Another way to do a cooldown is to add a decorator that’s allready provided. But, it would be harder to access that in other-places if you needed to show the remaining cooldown on the GUI and tweek the value at runtime.

Ok here’s my setup!

Behavior Tree:

BTTask Attack Enemy:

Collapsed Graph ‘Fire Attack 4’:

Enemy Starts Attack:

And the attack:

This is needlessly complicated but it works (sorta… locks up occassionally with race conditions) I want to do something like this, but its not working:

This looks like the way I mentioned with using decorator cooldowns. This should be fine until you need to display the cooldown times in the GUI or in game in some way, then you’ll want to switch to variables on the Controller.

How is it locking up?

To me, this does not look needlessly complicated as you mentioned. The tree will get bigger as more is added, nothing wrong with that.

I don’t understand how to get it to work, it just sits at the move to part of the sequence and doesn’t ever use the choose skill service.

Isolate it.

disconnect the other parts of the tree, just for testing. Have the Search for enemy and the move to. Does it work then?
Set a breakpoint on the move to node, At that time is enemy valid?

Is the enemy location on the nav mesh? Is this bot on the Nav Mesh? Is there a Nav Mesh?