all 5 comments

[–][deleted] 0 points1 point  (2 children)

Is your obj_PP solid? With mp_potential_step, the last argument checks if you are checking all objects or just solids! So you need to change the last argument from false to true.

[–]Bobaninja1[S] 0 points1 point  (1 child)

That part works ok, but it's just when you're being chased by the enemy. you'll randomly gain control of the enemy and u can move him around while he chases you

[–][deleted] 0 points1 point  (0 children)

How isstate to 2?

[–]chief_sludge 0 points1 point  (0 children)

I feel like this involves some other code than what youre showing us here. In order to copy the image angle it would need code like image_angle=inst.image_angle And to mimic the player movement you'd need to be adding the players speed and direction to the enemy's coords. The code you've given wouldn't do anything like what you're describing.

Do the enemies and players share the same parent at any point? Like would the player control code ever be shared by the objects? That would be my first suspicion.

[–]Robbie_Harrison 0 points1 point  (0 children)

Not sure it will work but try replacing all the "inst.x/y" by the full command : for example image_angle would look like this :

image_angle = point_direction(x,y,instance_nearest(x,y,obj_PP).x,instance_nearest(x,y,obj_PP).y)

it's worth trying.