So I have been trying to practice making AI without any good result, one of them is enemies/npcs walking around random place. I have tried to find on youtube or forum but can’t see any that close to what I tried to do.
I also tried pathfinding but it felt weird, the variable doesn’t start to randomize at all like if it 4 it stuck at 4. I also don’t know how to make them stop on certain distant, I thought change variable will do but apparently not
There’s an extension actually called “Make object travel to random positions” which does just that. It uses pathfinding and it’s supe easy to use. You can use an object timer for the NPCs that resets after a random value and moves them to a new random position.
Yeah I have try the extension before but without an example it kinda act weirdly. but yeah seem like it work alright base on your setup, could you help me with the stopping? I want them to stop either to stand there or do something, but I dont know how to make them stop and stand still
what I did is “if timer of NPC >= random number → random variable” and if it land on specific one, wait for random X time and do timer again but it not working (also I put OR on [the beginning of the scene} and have it with [if variable = 0] as a condition to start clock again, dont know if it good idea. Sorry for bothering I tend to over thinking to dumb solution
It really worked like how I wanted, god you are my saver, thank you so much .
I didn’t even think about this, make them move on their own spot to trigger the “reached destination” condition. Also could I ask why you put the random variable at the spot where the timer start? I cant see the different yet, also I thought make them move on their spot without the [for each object] would confuse them?
Oh yeah this dude, I have been watching this video over and over again and dissecting it, sucked cuz I have square brain lol, I always confuse like is the circle under enemies feet, like how that work and how to do it in gdev, is there a magical thingy I didn’t know? I was planning to watch it again for one of my project after this.