I'm trying to make a looping npc random roam Schematic (ala pokemon) and I'm running into a problem. Currently, when the Schematic starts, the npc will choose a random direction and move in that direction, however, I can't get it to loop. My logic here is that at the beginning of the schematic, it should update the current vector 3 variable to the current gameobject transform, then pick a direction by adding to that variable, then rinsing and repeating. However, I can't seem to get it working.
Without checking the details here - if there's no wait time involved in the schematic, it'll probably just repeat each frame, canceling out the move again and again. E.g. enable the Wait option in the Change Position node :)
What machine are you using to run the schematic?
Post edited by gamingislove on
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Awesome checking Wait has it working like I was expecting. I'm running it with auto. After taking a brief peek at the enemy movement in the 2D roguelike it looks like giving the ai the ability to check it's position in relation to the player and walls/colliders before picking a direction might be a good thing to look into. It looks like I have some more tinkering to do. Thanks, as always, for your help.
What machine are you using to run the schematic?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!