1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Enemys Shooting At Me

Discussion in 'Programming' started by Amoses, Jun 18, 2019.

  1. Amoses

    Amoses Member

    Joined:
    Jun 14, 2019
    Posts:
    48
    So I have a player that can shoot and i have enemys that randomly spawn, but i cant seem to get the enemys to shoot at me no matter what i do, if somebody could help me that would be great!
     
  2. Rob

    Rob Member

    Joined:
    Jul 12, 2016
    Posts:
    717
    What have you tried so far? Some examples of your code would be useful.
     
  3. Amoses

    Amoses Member

    Joined:
    Jun 14, 2019
    Posts:
    48
    i have tried watching a bunch of videos and they are all too old, and none work.
     
  4. Rob

    Rob Member

    Joined:
    Jul 12, 2016
    Posts:
    717
    Maybe you implemented them I the wrong way. There are plenty of things that can go wrong, especially if you don't fully understand what you're doing.

    If I were to code it, I'd use a collision circle check in the enemy's step event and allow the enemy to shoot if the player goes inside that circle.
     

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