User Tag List

Results 1 to 18 of 18

Thread: AI Templates (Blueprint)

  1. #1
    6

    Talking 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 (NEW)

    For new updates check out my website
    Name:  ue4rces.PNG
Views: 313
Size:  70.0 KB
    I- A.I Examples Template:



    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...


    II- Blueprint Only AI Samples :





    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

    III- Patrolling AI using Timers :




    A Simple Patrolling AI
    Updated using Timers and a Custom Sensory system for enemy detection
    Last edited by Mhousse1247; 04-20-2017 at 02:25 PM.
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

  2. #2
    0
    Update :
    - Some bugs Fixed
    - Dead link updated
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

  3. #3
    0
    @Mhousse1247 - Great work man, these are really useful.
    Storyteller - An immersive VR audiobook player

    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

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

  5. #5
    0
    Quote Originally Posted by n00854180t View Post
    @Mhousse1247 - Great work man, these are really useful.
    Thanks !
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

  6. #6
    0
    Quote Originally Posted by Angrytoilet View Post
    can they be used in 4.13?
    i know, i should jsut DL and find out, but, im at work lol
    There are just 2 or 3 nodes to fix , but generally it work !
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

  7. #7
    0
    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!
    Last edited by AP_Studios; 09-17-2016 at 10:59 PM. Reason: update

  8. #8
    0
    WOW thankyou for this! you are awesome!

  9. #9
    0
    Quote Originally Posted by frostic View Post
    WOW thankyou for this! you are awesome!
    glad it helped !
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

  10. #10
    2
    Updated to 4.13
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

  11. #11
    2
    Timer issue fixed !
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

  12. #12
    0
    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.

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

  14. #14
    0
    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

  15. #15
    0
    Quote Originally Posted by unit23 View Post
    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
    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
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

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

  17. #17
    0
    When will the download link become available?

  18. #18
    0
    Quote Originally Posted by Muhammad Hafiz View Post
    When will the download link become available?
    Available again !
    Website [ LINK ]
    Twitter [ LINK ]
    Support ! [ LINK ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •