AI replying to AI

More blueprint questions! OK, I have managed to get AI playing sounds simultaneously with help from others, but how do get AI to play a sound, after another AI said something, basically saying how to get AI replying to each other. Like one guy says “Clear!” another guy says “OK, Go!”.

There’s several ways to do it, in a lot of games there is a certain amount of faking done. While a simation it might be interesting for each AI Bot to be autonomous and process each thing it hears individually it might not be the best thing for your game.

It might be better for a squad leader to make the other members of the squad bark the way it wants, for that it can keep a reference to each bot in its squad and then call a bark on the one it wants to respond as it fires it’s own bark. You could call a function that takes a variable in to set a timer on to then play the response.

A lot if game AI is making the player thing the bit is smart, it’s not necessarily making he not smart.

Anyway there’s lots of ways. What way is best for your game is depends on your design and overs goals for it .

Woah, ok but maybe you go into just a little bit more detail on the whole bark thing, I am new to C++

The way I prefer to solve this problem is by having a kind of “Chatter Manager” that among many things would allow an AI to direct a vocal message towards another AI individual or a group and make sure there’s not too much chatter going on at one time.

Having said that, there’s no such thing in the engine just yet. We might want to add it to (slowly) upcoming “Character AI module”

Cheers,

–mieszko

I don’t see any reason you couldn’t make a system for this in Blueprints, either way BP or C++.

I was using the term bark to describe the voice phrase. You would make a Bark Object that had a sound to be played, then each type of bot would have a list of them that they could play.

It not necessarily the right way to go for your game, it really depends. But instead of trying to have each Bot continually listen for talking and then try to figure out what to do with it, instead you could have one of the Bots, the speaker control it.

For example, there is a squad of 4. The leader is Going to say, “Someone take out that machine gun”, then the engineer says, “I’m on it” and moves out to throw grenades or something.

The squad leader AI could have selected the Engineer ahead of time though, from it’s squad list, and then called a function directly on him that had a timer in it, say 5 seconds. Then the leader says he’s phrase, when the timer goes off, the Engineer would say his phrase.

You, could always make the initial speaker in charge, and it would send a message to any other Bots telling them exactly how and when to respond.

This way of doing it is not a simulation, but would give you good control over how the bots are acting.

It’d be awesome to have that module!