Follow the First tutorial on manual the mob spawn from the middle why is that?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lizhe

I found the mob is not spawn from the path2d, some of them start from the middle.

Seems related to the spawnlocation = randi() part when I fix the value to 100. No mob start from the middle, but I don’t know why is happened?

The code is here.

https://gitee.com/lovelife_lizhe/godot_project