maybe i can help you.
dim enemyx(2)
dim enemyy(2)
make arrays for the enemys positions, in this case there are 2 enemys.
playerx=50
playerz=50
the players position.
ok now the main loop, i supose that you've got already the movement for the player so i'm not going to explain that.
do
for enemy = 1 to 2
the first thing we must do is decide wich direction the enemy should go:
if enemyx(enemy) < playerx then moveright=1
if enemyx(enemy) > playerx then moveleft=1
if enemyy(enemy) < playery then movedown=1
if enemyy(enemy) > playery then moveup=1
next, moving the enemy and defining the old positions for collision
oldx=enemyx(enemy)
oldy=enemyy(enemy)
if moveright=1 then enemyx(enemy)=enemyx(enemy)+10:moveright=0
if moveleft=1 then enemyx(enemy)=enemyx(enemy)-10:moveleft=0
if movedown=1 then enemyy(enemy)=enemyy(enemy)+10:movedown=0
if moveup=1 then enemyy(enemy)=enemyy(enemy)-10:moveup=0
position sprite/object,enemyx(enemy),enemyy(enemy)
if colliding = 1
position sprite/object,oldx,oldy
here is the problem for me, i cant help you any further this fast, but here you need to make what the enemy must do, wich direction he must go etc, try another way... etc,
endif
next enemy
loop
i should it do a bit like this.
good luck,
syntax error??? it isn't an error, it is a feature