Search

Compare Yourself

What software do you make games with? (select more then one)

Loading ... Loading ...

Make monsters move towards your player

In this Game Maker video tutorial you will learn how to use a step event in GameMaker 8 to create a loop that continually checks the location of an object and has another object move toward it.

(credit MrSRIsaacs)


5 comments to Make monsters move towards your player

  • Rodrigo

    Hi i did what you do here, but know i have a problem, i have a plataform game here, so if i jump, he fly xd
    and another problem is that if i kill the enemy it give me a error
    ERROR in
    action number 2
    of Step Event
    for object obj_enemy1:

    Error in expression:obj_player.x
    position 12: Unknown variable x

  • helpful_ozzy

    did you name the object that was being chased did you name it on the move toward the same as the actual object coz you could have the thing being chased called “bob” and the move towards object2

  • Bob Cole

    Hm, dosn’t really work for me. All that happens is that the “teacher” is running to the upper left corner.

  • How can i create an object that moves towards her when she gets closer?

  • atschoolboy

    dude can you set the code in the reply’s cuz i do a game maker project at school

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>