Beginner - help with enemy movement

Discussion in 'Programming' started by mob16, Jan 15, 2020.

  1. mob16

    mob16 Member

    Joined:
    Jan 15, 2020
    Posts:
    2
    I am a beginner using gamemaker 8. I have experience in some programming language before.
    I have a simple game with enemys and player. Once my player is too close to the enemy (without touching) the enemy begins to move erratically around the level. Any help on how I could over come this??? Any help is greatly appreciated.
    Thanks in advance
     
  2. Adjud

    Adjud Member

    Joined:
    Sep 11, 2017
    Posts:
    73
    what code are you using?
     
  3. mob16

    mob16 Member

    Joined:
    Jan 15, 2020
    Posts:
    2
    I have only used drag n drop for this... have on collision with enemy jump to stsrt position but problem is when close to enemy it moves.. no code for thos and i have just set direction and vspeed for enemy so shud only move up n down
     
  4. Adjud

    Adjud Member

    Joined:
    Sep 11, 2017
    Posts:
    73
    well im not sure about drag and drop, but your sprite might be too large, so if you touch the enemy and its supposed to go back to start witch would be where you placed the enemy to start with it would jump back to where it started but collide with your object that is sitting in its spot, so it ends up jumping indefinately. i would pay attention to the size of the sprite image. i don't have enough information about your game to give you further assistance.
     
  5. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,372
    Click Object Info button and copy-paste the contents here
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice