Hello there!
I need a bit of help with my ModPE code.
The code should make it so that whenever i hurt a mob with a diamond sword, it will explode.
I have made many changed and improvments, but it still does not work.
Here is my code:
function attackHook(attacker, victim)
{
if(getCarriedItem()===276){
explode(victim,3.1);
}
}
Please tell me what I am doing wrong!
Rollback Post to RevisionRollBack
If I helped in any way, feel free to drop me an Internet:
Or some Blue XP:
A test to see what number is most thought of when a 1-10 choice is given: strawpoll.me/4012187
Don't think about it, just click on the first one that comes to you!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI need a bit of help with my ModPE code.
The code should make it so that whenever i hurt a mob with a diamond sword, it will explode.
I have made many changed and improvments, but it still does not work.
Here is my code:
function attackHook(attacker, victim) { if(getCarriedItem()===276){ explode(victim,3.1); } }Please tell me what I am doing wrong!
If I helped in any way, feel free to drop me an Internet:

Or some Blue XP:
A test to see what number is most thought of when a 1-10 choice is given: strawpoll.me/4012187
Don't think about it, just click on the first one that comes to you!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI really need help with this!
If I helped in any way, feel free to drop me an Internet:

Or some Blue XP:
A test to see what number is most thought of when a 1-10 choice is given: strawpoll.me/4012187
Don't think about it, just click on the first one that comes to you!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumPlease?
If I helped in any way, feel free to drop me an Internet:

Or some Blue XP:
A test to see what number is most thought of when a 1-10 choice is given: strawpoll.me/4012187
Don't think about it, just click on the first one that comes to you!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThank you so so much!
I thought if maybe I just called "victim" it would explode at the victim, but I didn't think of Entity.get
If I helped in any way, feel free to drop me an Internet:

Or some Blue XP:
A test to see what number is most thought of when a 1-10 choice is given: strawpoll.me/4012187
Don't think about it, just click on the first one that comes to you!
-
View User Profile
-
View Posts
-
Send Message
Retired Staff