here is my code:
def updatezombies(Task): i=0 for z in zombieArray: pos=zombieArray[i].basezombie.getZ() pos=pos +0.0005 zombieArray[i].basezombie.setZ(pos) i+=1 return Task.again
it works correct on the first generator I make- but if you add additional generators- every time you add a new generator all the zombie’s accelerate.
Why is this?
[color=red][b]Edit: Nevermind I had set the code inside of another loop because of an indentation mistake. It needed to be on it’s own.
the purpose is to update the positions and move each zombie at the same rate irregardless of how many zombies or zombie generators.