Skeleton attack speed?

Discussion in 'Plugin Development' started by NonameSL, Sep 20, 2014.

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

    NonameSL

    I have this custom entity, and I want it to shoot 6 arrows per second.
    What I currently do is override the a(EntityLiving, float) method, and repeat it 6 times with a for loop.
    Of course, that is one way to do it, but that is not what I am aiming for, but I know what the problem is.

    I use a for loop, because I do not know the delay I should use, because I don't know the attack speed. If the attack speed was 60 (1 arrow per second) I would put the delay between shootings as 1/6 seconds, and repeat 6 times.

    So I want one of these two questions answered, only one of them:
    1. How do I get the skeleton attack speed / arrows per second?
    2. How do I set the skeletons arrows per second to 1?

    Thanks in advance! [cake]
     
  2. You can measure the first one. Also, using an API would be better, such as
    http://dev.bukkit.org/bukkit-plugins/controllable-mobs-api/
    but even with this you can only adjust the damage, not the speed.
    Wait! Here's an idea:
    Get the event when the skeleton fires an arrow, and then schedule a few arrows afterwards which will be fired from the skeleton's position.
     
Thread Status:
Not open for further replies.

Share This Page