How can I make a zombie go to a location and kill every player on the way?

Discussion in 'Plugin Development' started by FunnyItsElmo, Apr 24, 2013.

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

    FunnyItsElmo

    Hello,
    Currently i'm working on a plugin and for that i need controlable zombies.
    I want that a zombie go to a point and kill all players on the way in a radius of 30 blocks.
    The problem is that i dont know how i can make a zombie controlable. So i need your help!

    Thanks in advance!
     
  2. Offline

    FunnyItsElmo

    No one knows how i can make a zombie controllable?
     
  3. FunnyItsElmo likes this.
  4. Offline

    FunnyItsElmo

    Hellsing The api RemoteEntities does not work. The zombies that I've spawned with the api always standing on the same location and did not do anything even if I have not edited them.
    Code:
    RemoteZombie entity = (RemoteZombie) main.getEntityManager().createEntity(RemoteEntityType.Zombie, location);
     
  5. thats because you are supposed to edit those zombies to do what you want, if they move out of them self, what's the point of exact control of their movements.
     
  6. Offline

    FunnyItsElmo

    Ah okay i thought the entitys have a default behavior.
     
  7. Offline

    FunnyItsElmo

    The zombies simply do not want to go to the location :confused:
    Code:
    RemoteZombie entity = (RemoteZombie) main.getEntityManager().createEntity(RemoteEntityType.Zombie, new Location(world, x, y, z));
    Mind mind = entity.getMind();
    mind.addMovementDesire(new DesireSwim(entity), 1);
    mind.addMovementDesire(new DesireAttackOnCollide(entity, EntityHuman.class, false), 2);
    mind.addMovementDesire(new DesireMoveTowardsRestriction(entity), 3);
    mind.addMovementDesire(new DesireMoveThroughVillage(entity, false), 4);
    mind.addMovementDesire(new DesireWanderAround(entity), 5);
    mind.addMovementDesire(new DesireMoveToLocation(entity, new Location(world, x+100, y, z)), 6);
    mind.addMovementDesire(new DesireLookRandomly(entity), 7);
    mind.addMovementDesire(new DesireLookAtNearest(entity, EntityHuman.class, 8.0F), 8);
    mind.addTargetingDesire(new DesireFindAttackingTarget(entity, 8.0F, false, false), 9);
    mind.addTargetingDesire(new DesireFindNearestTarget(entity, EntityHuman.class, 8.0F, false, true, 0), 10);
     
  8. Offline

    FunnyItsElmo

Thread Status:
Not open for further replies.

Share This Page