#Async Spawn + Path Finding
2 messages · Page 1 of 1 (latest)
So I know I can resolve the spawning by adding a 3 second delay like so:
-- move through map async
coroutine.wrap(mob.Move)(newMob, map)
task.wait(3)
While this now delays the spawning only the first mob will move. Any mobs spawned only stand there.
I think this is because the pathing for each mob must complete before it moves.
I think Ill have to use multiple threads for each mob:
thread1: for each path computing
thread2: for each mob that walks on the path