How do we make it so that we can change a mobs certain health also if its a retextured mob
spawnPigZombie(x,y,z,item."Image")
also how do we change the damage of a item does.
Plz help this is all for my mod im preparing to release.
Rollback Post to RevisionRollBack
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
On BlockLauncher, use Entity.setHealth with the returned mob ID.
var myMobThatILoveLikeAG6 = spawnPigZombie(x,y,z,1,"mob/asdf.png");
Entity.setHealth(myMobThatILoveLikeAG6, 1); //1 halfheart
For changing damage, use attackHook, cancel the existing attack, and then use getHealth and setHealth to manually hurt the mob.
Thanks you helped me a lot. But can you give me a example on changing the damage.
Rollback Post to RevisionRollBack
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
Thanks you helped me a lot. But can you give me a example on changing the damage.
function attackHook(attacker, victim) {
if (getCarriedItem() == 318) { //flint
preventDefault(); //cancel the normal attack damage
// if you want to just add damage, you
// might not need to cancel the existing damage.
Entity.setHealth(victim, Entity.getHealth(victim) - 10); //5 hearts
clientMessage("You sliced your victim open with a piece of flint");
}
}
function attackHook(attacker, victim) {
if (getCarriedItem() == 318) { //flint
preventDefault(); //cancel the normal attack damage
// if you want to just add damage, you
// might not need to cancel the existing damage.
Entity.setHealth(victim, Entity.getHealth(victim) - 10); //5 hearts
clientMessage("You sliced your victim open with a piece of flint");
}
}
Thanks!
Rollback Post to RevisionRollBack
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
Make sure you follow me on twitter! @DarkDiaMiner IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
To post a comment, please login or register a new account.
Plz help this is all for my mod im preparing to release.
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumOn BlockLauncher, use Entity.setHealth with the returned mob ID.
For changing damage, use attackHook, cancel the existing attack, and then use getHealth and setHealth to manually hurt the mob.
Thanks you helped me a lot. But can you give me a example on changing the damage.
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumfunction attackHook(attacker, victim) { if (getCarriedItem() == 318) { //flint preventDefault(); //cancel the normal attack damage // if you want to just add damage, you // might not need to cancel the existing damage. Entity.setHealth(victim, Entity.getHealth(victim) - 10); //5 hearts clientMessage("You sliced your victim open with a piece of flint"); } }Thanks!
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->
I already told you! :PAnd why would you need a black out/game crash?
When You never told me?
IF I post a mod download it and give me a +1 if you appreciate.
Make sure you give me a suggestion at my WIP topic darkPE
Make sure you click on that +1 button if I help you! ---------------->