Paras Work Thread, 2024-11-05 - 2024-11-05 18:49
I am keeping a safe-ish distance from freaking out about the election by working on Paras. And I’ve made progress with my first bit of AI programming!
Essentially I am creating the NPC runners now, and I first set up my navmesh around the track, setting the inside of the track to be an obstacle so the runner is forced to run around it. I then set 12 waypoints around the track and have the runner cycle through them. Whenever they get to the waypoint just past the finish line, their blueprint ticks down a lap counter, and when they’ve run three laps, it stops running.
Also, during this, I found out that most of my comments about how branches work that I made in this post about my initial thoughts on programming in Blueprints is not actually true! You can just wire two cables into the same execution pin. I will say that it’s kind of frustrating that I didn’t really know that until I searched for it. It does feel like the UE documentation favors just walking through a tutorial, when I would really prefer actual prose on the concepts involved in most cases. But in its defense, I explicitly did not read the Blueprints documentation too closely because by that point I felt like I had enough of an idea from tutorials. Oh well.
Next up for me is to do some refactoring of this code so that rather than just trying to run themselves, the NPC runners wait for the race to be started. Likewise, I want to turn off the player runner from running until that occurs. Then I think after that, I need to reimplement the speed and stamina system I did for the player runner for the NPC runners, and get into my first behavior trees by having the NPC runners manage their stamina in relation to other runners.