Training Stream - Basics of AI - April 14th, 2015

WHAT
Training Content Creator walks us through getting up and running with AI in Unreal Engine! He will show you how to do simple patrol AI including path finding using navigation meshes as well as simple Behavior Trees.

[In a future stream, we will dive into more advanced topics like the Environment Query System!]

WHEN
Tuesday, April 14th @ 3:30PM-5:00PM ET - Countdown]

WHERE
www.twitch.tv/unrealengine

WHO

  • Training Content Creator

Feel free to ask any questions on the topic in the thread below, and remember, while we try to give attention to all inquiries, it’s not always possible to answer everyone’s questions as they come up. This is especially true for off-topic requests, as it’s rather likely that we don’t have the appropriate person around to answer. Thanks for understanding!

Edit: The YouTube archive is available here](Basics of AI | Live Training | Unreal Engine - YouTube)

kewl stuff, looking forward to it.

good job on coming up with these training streams btw. just what we need

Is it C++ or BP?

[QUESTION] How to make the AI jump from higher ground to lower with the help of navlinks? Or Is it better to use trigger volumes instead?

Uhm…Nice!

This one will be using Blueprints.

Can we go over the proper way to use decorators in BTs?

I know it is a little off topic, but would it be possible to show the basics of selecting “targets” (in game this would be the enemy target), but for simplicity sake, the example could just be to target any other instances of itself (the AI), and move to that target? I have found targeting other players and objects to work fine, but I can’t seem to get multiple instances of a single bot to target each other- for example a Free-For-All gamemode.

Could you use this sort of thing to find health, ammo or weapons? If so, that’s of interest to me.

Doesn’t enabling the sensing component allow the AI in question to detect all pawns? Including other AI.

In my game currently they are able to “see” eachother.

@bokuden they are fairly easy. They act as a condition for that branch. You use them with Blackboard Data elements (that are set from a service higher up in the tree) to determine what the actor should do. They are just the conditions in a branch.

Will PM you so we don’t clog up this thread!

How do you tell your AI pawn that it’s time to shoot at another player? And how do you set your AI character transform so that he is facing the target player?

Yes, you would be able to target any actor on the map- I have a basic setup right now but would be interesting to see how it “should” be done- I’m just casting to any instances of a certain actor/blueprint and checking to see if there are any within a radius, then having the AI move to the nearest one (using an EQS query). However, the problem is that you can’t select the AI that is querying as the target, so I’m stuck there.

@bokuden I haven’t actually looked into the sensing component properly, even though it’s intended for more simple AI actions it actually looks like it could be really powerful and do exactly what I want- if they can look for other instances of themselves, and move toward each other then that is exactly what I’m looking for!

@Demolition-Man the logic behind when to shoot is up to you. You can use a cooldown decorator on a behavior tree to have a delay between shots. Facing another player will use the find look at node in your blueprint.

[QUESTION] Very big question here that I have been seeing for a long time. What is the AIPerception Component and how can we use it?

[QUESTION] Can you explain how to manipulate the navmesh and how path cost actually works?

This might be a topic for the advanced training, but I’ll ask it anyways:

How would you randomize AI behavior based on game-time (local/server time) / Time of day system?

Hello,

I dont know if this fits in but what are the options if our game is procedurally generated? Basically its building upon the Endless Runner tutorials but we use Spline Meshes for the road. The player runs through a Box trigger that then spawns a BP which then builds the Splinemeshes and other Geometry in the Contruction script and attach it to the last Roadtile. Seems like Navmesh is not an option here :frowning:

2nd Question: is there something special to consider when using vehicles and AI or is it basically the same?

Thanks in advance.

Hi,

I have a very beginner question:

[QUESTION] Is there a guideline for where the different kind of data and logic goes when setting up AIs. For example character health could be placed within the Actor thats controlled by the AI Controller, it could also be placed within the controller itself, or it could even be placed in the Behavior tree as a key. Another example could be a “Attack” function, which could reside in any of the three places, but where would it make most sense, and is there a good guideline for where to place the different fields and methods.

Thanks, for taking the time to put the streams together, they are super useful! :slight_smile:

great stream thanks and everyone

want more lol :slight_smile: