Zombie ignore players

Discussion in 'Plugin Development' started by Tomass, Jul 19, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Tomass

    Hello,

    how to make zombie ignorable to players for temporary time? I know EntityTargetEvent, but I can't use events in such situation as I already use NMS, Pathfindergoals, constructos for my custom zombies. Is there some ways to prevent following players, for instance, when zombie is walking back to its location?

    Thank you guys.
     
  2. Offline

    SuperSniper

    if(z.getTarget() instanceof Player) {
    // do stuff?
     
  3. Offline

    Anrza

    I think that you can decrease the search radius for zombies? If you set it to 0, it should not be able to target anything.
     
  4. Offline

    Tomass

    I'm not using events.
    Yes, but zombie will stop walking at all, consequently, will not walk back to its location.
     
  5. @Tomass
    EntityTargetEvent should still be called, what's the main issue of it?
     
  6. Offline

    Tomass

    As I said above, I'm using constructors. I created my own PathfinderGoal which checks distance between spawn and current location and if distance is more than 10 bloks zombie returns back to its spawn loc.
    [​IMG]
    So, when zombie walks to spawn location he still can change walking route to the player. I want to disable targeting when zombie returns. How can I do that?
     
  7. Offline

    Reynergodoy

    set them as tamed :)
     
  8. Offline

    Tomass

    how?
     
  9. @Tomass
    You could temporary remove their player attack path finder
     
  10. Offline

    Tomass

    I tried but I didn't work. Maybe I did something wrong. Could you give me an example please?
     
  11. Offline

    Reynergodoy

    thats a bit hard :)
    but i'm sure that i saw it somewhere :\
     
  12. @Tomass
    What is your code when you first set the custom path finder goals?
     
  13. Offline

    Tomass

    [​IMG]
     
  14. Offline

    Tomass

    BUMP.
     
  15. Offline

    Tomass

    Please help!
     
Thread Status:
Not open for further replies.

Share This Page