This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
I've tried
function attackHook(attacker,victim)
{
if(getCarriedItem() == 480)
if (Entity.getEntityTypeId(victim) == 15)
Level.dropItem(Entity.getX(victim), Entity.getY(victim), Entity.getZ(victim), 1, 481, 1, 0); //left out first int, range
//15FVillager
}
And I have no clue why it refuses to drop (481 is defined in my scriptscript)
Try setting the velocity of the dropped item to 0, the parameter before 481, I think its dropping it, but the velocity is making it zip out of the area.
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions
I've tried
function attackHook(attacker,victim)
{
if(getCarriedItem() == 480)
{
if (Entity.getEntityTypeId(victim) == 15)
{
Level.dropItem(Entity.getX(victim), Entity.getY(victim), Entity.getZ(victim), 1, 481, 1, 0); //left out first int, range
//15FVillager
}
}
}
And I have no clue why it refuses to drop (481 is defined in my scriptscript)
Try setting the velocity of the dropped item to 0, the parameter before 481, I think its dropping it, but the velocity is making it zip out of the area.
Want Custom ModPE functions? Look here -> WolfyPE ModPE functions