+2

AI wandering system

Crystalius 2 years ago updated 9 months ago 12

Hi!

Thought someone might find it useful.

Demon wandering system. Vid sped up.

Every randomized seconds, an invisible empty object orbits around another one (center, here white lines begins) for randomized time and stings red line into the ground, making a new destination for demon. 

Range (distance from center) is also randomized for better simulation of natural wandering.

This system works well when confinement in a small space is needed. AI won't wander further than maximum range of orbit that is set.

Cannot embed video so check it either on Facebook: https://www.facebook.com/CrystalGames1111/videos/2177147375835121/  or Twitter: https://twitter.com/CrystalGames333/status/1056998250446761985

I've just cut out the code from my project. Removed too project specific stuff. Adjust everything to your needs.

Macro: AI Wandering System

Good luck!

Bolt Version:
1.4.10
Unity Version:
2019.2.17
Platform(s):
Windows
Scripting Backend:
Mono
.NET Version (API Compatibility Level):
.NET 4.x
+1

Thank you for sharing! This reminds me to the wandering of some NPCs of Baldur's Gate.

Happy it's useful for someone!

I remember I loved Baldur's Gate very long time ago 😊

Crystalius, could you please upload it again? When I try to add it to a Game Object it crashes Unity. 
I don't know why.

Sure! But only in up to 6 hours. I'm glad someone found it useful. 😊

Updated original post. It should work now. Good luck!

I don't understand why, but I can't open the graph or assign the macro to a Machine. I'm using Unity 2019.3.0f3 and Bolt 1.4.9. Could it be a problem of incompatibility between Bolt versions?

Add NavMeshHit to your Unit Type options. If it still doesn't work, then I don't know what to do. You could try empty project with newest Bolt to check if that's compatibility issue.

Weird. I already had NavMeshHit as an Unit Type and I was using the last version of Bolt. I will ask on the Discord then.

So, was it the problem? How are you doing?

I think it's because of your Unity version! 3's still beta. Many people already had problems with unstable newest Unity versions and Bolt. Also, newest Bolt is 1.4.10. In case nothing works — I can send you screenshots of everything.

Hi. I have some personal difficulties but I will try it again very very soon. If you post screenshots I will not bother you again. It worked for me long time ago but I don't remember which version I used. Sorry.

It's ok, you're not bothering me at all 😊 Just try with the non-beta version and everything should be fine I think. I am using 2019.2.1 and everything's great. I will post screenshots in case you can't open with non-beta version.

Wish you the best 😊