Download

AI Templates (Blueprint)

Hi again Unreal Community!
This new thread will be dedicated to AI project samples using Blueprint and Behavior trees. Update : 04/20/2017[SIZE=28px] (NEW)** [/SIZE]**
For new updates check out my website
ue4rces.PNG

[FONT=Comic Sans MS]I- A.I Examples Template:

https://youtube.com/watch?v=VlGTI4rVzLA

AI Agents:

1. Turret:

• Detect the player within a certain range (Inside detection sphere) and rotate towards him
• Attacking he player if the Line Trace hits him

Two Attacks:

• Projectile : Instant Damage
• Electricity : Continuous Damage

2. Search Light:

• Patrolling randomly in the map
• Chasing and dropping bombs on the player
Damage type: Radial Damage

3. Robot:

• Patrolling between patrol points or randomly.
• When player is in sight, the robot can Chase, shoot and kill him.
• When a suspicious noise is heard, the robot will search for the suspect in differs location around noise location.
Damage type (Projectile): Instant Damage

Sensory systems

• Custom using a Sphere Collision + Line Trace for Turrets
• Pawn Sensing Component (Sight) for Search Lights
• AI Perception Component (Sight and Hearing) for Robots

AI Logic :

• For turrets the whole logic is in the Turret Blueprint
• For Search lights and Robots, the AI logic is build using AI Controllers, Blackboards, Behaviors Trees, Services, Tasks, Decorators…

[FONT=Comic Sans MS]II- Blueprint Only AI Samples :

https://youtube.com/watch?v=G5fz6fPNvQk

AI Agents:

1. Guard:

• Patrolling between Target Points.
• When player is in sight, the guard can Chase, shoot and kill him.
Damage type (Projectile): Instant Damage

2. Search Light:

• Patrolling along a spline.
• Detecting and chasing the player
• Alerting the guard if the player is detected
Damage type: No Attack

Sensory systems

• Guard :

  • Sight : Trigger Box + Line Trace
  • Touch : Capsule Hit
    • Search Light
  • Sight : Cone Mesh

AI Logic :

AI logic is located inside each agent Blueprint class

[FONT=Comic Sans MS]III- Patrolling AI using Timers :

https://youtube.com/watch?v=dX6rbD4JSWw

A Simple Patrolling AI
Updated using Timers and a Custom Sensory system for enemy detection

[FONT=Comic Sans MS]IV- Vehicle AI Example :*** New -01/22/2018-***
https://youtube.com/watch?v=RR9PjSLLnmU

Update :

  • Some bugs Fixed
  • Dead link updated

@Mhousse1247 - Great work man, these are really useful.

can they be used in 4.13?
i know, i should jsut DL and find out, but, im at work lol

Thanks !

There are just 2 or 3 nodes to fix , but generally it work !

yeah - i had to replace the handle clears to the new ones and swap to my own character BP … super easy …

just cant get him to walk around on my nav is all … working on it now.

edit:

forgot i deleted my waypoint lol … woops
working on getting the detection to work. i think couple of the nodes dropped from the transfer … will update when i get it working

Edit:
Walking around from waypoint to waypoint without issues (unless i stand in front of the bot and block, haha, that big dummy …) but i cant seem to get the bot to “notice” the player. Still working on it.

9/17 edit:
Looks like the issue standing in my way is reported from the AI BP itself. The change to “Cast to PlayerCharacter” for the overlap node …
“Player Character” does not inherit from “Primitive Component”; cast would always fail.

I assume this is something “wrong” with my player character itself, so, i looked over it all and i cant see any reason why i would be getting this. Any ideas?

EDIT/UPDATE:

Got it working - i connected the nodes from “other” (and not overlap) to the “cast to player” and it works 100% fine. Sheesh … its that late-night sleepy blueprinting that gets me every time!

This works REALLY great in 4.13 … very fast and, dare i say, 0 change in FPS/CPU … amazing work sir!

WOW thankyou for this! you are awesome!

glad it helped !

Updated to 4.13

Timer issue fixed !

I had an issue with the Robot in the AI Blueprint, when he shoots at player, his projectile is colliding with the himself and not leaving his body, any idea on a simple collision setting on the robot? Not sure what would fix this, I am on a Mac, not sure if this would matter.

Thank you so much for the AI templates, I think I am beginning to grasp how to make the AI react smoothly to changes…

When i begun with AI i used your older example without BTree. Recently tested the new example with BTree, and i have to say that this is a very good setup, easy to follow code, with some nice features. Thanks for sharing, learned a lot, and no longer afraid of BTree’s :slight_smile:

Glad it helped !
I wasn’t a big fun of behavior tree , I always liked to write my own logic.
I opened BT the first time after 2yrs of using ue4 , It was a litle tricky the first week , but after the process is straightforward

wow,this is really handy!It helps my project a lot!Thank you sir!

When will the download link become available?

Available again !

Hi, am I being daft and missing something here or is there a download link or something so we can see these blueprints? This looks really handy but I’m not sure how to access it? :slight_smile: Thanks

Hereis it , but it’s already in the first page if you click website image !