AI works by detecting the X and Y position of your player
basically:
forever
if Xposition < Xpoistion of player unit
change X by (positive number)
if Xposition > Xpoistion of player unit
change X by (negative number)
if you've learned shooting this is another technique
forever
if distance to player unit < 150
(add all the shooting activation scripts in here)
also don't forget to add this, you can also put this within the movement
side scroller:
forever
if Xposition < Xpoistion of player unit
point in direction (90)
if Xposition > Xpoistion of player unit
point in direction (-90)
overworld:
forever
point towards [player unit]
you can also change it to this
forever
if distance to player unit < 200
point towards [player unit]
I'm currently working with a scrolling AI that when it bumps into a wall it will find a way around it, however that's where things can get pretty complex
Offline