Week 3 Devlog


For this week, I worked on getting the AI up and running. How I set up the AI is that on the event tick, I have it hooked up to a branch that checks to see if the AI has heard rock and goes to the sound location. If it did, else it check to see if it has seen the player. If it has, the AI will move to the player's location; else, it will move onto another branch which checks if the developer has enabled patrol points. if patrol points are on, the AI will move between four different points represented by spheres only visible in the editor. Else the AI will roam to a random location. Additionally, if the AI is set to waypoint mode, it will change the AI mesh color to show the difference in a more visual way to the player.
The patrol point function works by having a do once node that leads into an aiMoveTo node with the corresponding waypoint location hooked in; it then repeats this for each waypoint; once it has moved to all waypoints, the do once the node is reset to allow the AI to repeat the previous process.

The randomRoam function works by finding a random location that is reachable and then moving to that location.

The following rock sound works by having the rock spawned by the player create a report noise event which allows the AI to know that a rock was thrown. The AI then finds the location of the last rock thrown and goes to that location.

Files

w3-1.PNG
Dec 06, 2022
w3-2.PNG 152 kB
Dec 06, 2022
w3-3.PNG
Dec 06, 2022
w3-4.PNG
Dec 06, 2022
w3-5.PNG
Dec 06, 2022
w3-6.PNG 59 kB
Dec 06, 2022

Get AI_Project

Leave a comment

Log in with itch.io to leave a comment.