In need of a good goto

Blitz3D Forums/Blitz3D Programming/In need of a good goto

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here's the code:
If KeyDown(200) Then
MoveEntity player,0,0,-2
MoveEntity cam,0,0,-2 
MoveEntity sphere,0,0,-4 
For e=1 To MAX_ENEMIES
MoveEntity enemy[e]\pivot,2,0,2
PointEntity enemy[e]\pivot,player
PositionEntity enemy[e]\pivot,EntityX(enemy[e]\pivot)+Rnd(1,4),tery+6,EntityZ(enemy[e]\pivot)+Rnd(1,2)
Next
EndIf


If KeyDown(208) Then
MoveEntity player,0,0,2
MoveEntity cam,0,0,2
MoveEntity sphere,0,0,4 
For e=1 To MAX_ENEMIES
;MoveEntity enemy[e]\pivot,-2,0,2
PointEntity enemy[e]\pivot,player
;PositionEntity enemy[e]\pivot,EntityX(enemy[e]\pivot)+Rnd(1,4),tery+6,EntityZ(enemy[e]\pivot)
Next
EndIf

What I'm trying to do is get my sprite soldiers to follow the player. In the actual game they won't do this automatically like in this example I just left it that way for testing. Also you'll notice the cam is not parented to the player and that's because I'm using a smooth follow cam. But anyways. The problem is the sprites either all bunch up or when I'm not going directly in the X direction they don't follow so well. Any ideas?

Thanks