1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Entity Follow Player and Attack Them?

Discussion in 'Development' started by Junkdude, Jan 28, 2017.

  1. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    How would i make an entity follow/attack a player? I have to spawning part down.
     
  2. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
  3. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Movement (not sure):
    PHP:
    $entity->setMotion($player->subtract($entity)->normalize());
     
  4. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
  5. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
    nah doesnt work
     
  6. Junkdude

    Junkdude Zombie

    Messages:
    346
    GitHub:
    JunkDaCoder
  7. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
  8. imYannic

    imYannic Baby Zombie

    Messages:
    113
    Use the search bar, there are a lot of similar threads.
     
    gistrec likes this.
  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.