Hi everyone! Got the next part of the vehicle update for you this week!
Last week I updated the vehicle code so that they navigate to the correct buildings for their work commute but didn't have time to update the civilian AI so they could find their way back to their vehicles to commute back.
This week rectifies that and now civilians can find and enter their vehicles:
This took me longer than expected because it turned into a surprisingly complicated process that is still going to have further additions.
The decision of whether or not to use the car is currently based on whether they own one and whether they are more than a block away from their target destination. This does means some civilians park and abandon their cars because their work is opposite the street from where they live (in a 1x1 city grid this is guaranteed).
This code also sets up the framework for how cops and others will find and use vehicles as needed. I want to focus on having cops use vehicles and having visuals for cop cars and I'll probably be working on this next week, which I know is something a lot of you have been waiting for!
Thanks again and see you next week!
