I need help, because I don't know how to remove specific mobs (I know how to remove all) with ModPE Javascript. Maybe with Entity.remove(); ? But what comes in the () ?
I want to remove all monsters, but not the other mobs.
Um no. The Entity.remove() and Entity.setHealth() both take in the native entity's ID. This can be found by setting up a function inside of the entityAddedHook() to send all of the spawned mobs ID's into an array. Then when you want to remove the mobs, you can use an if statement and getEntityTypeId() on each of the items in the array (loop function) to see if they are a monster ID. If they are, then remove them using Entity.remove() and put inside the par. the Native ID of the mob from the array.
Does this make sense?
*I don't know for sure if this will work!
Rollback Post to RevisionRollBack
", sans-serif">Want to get paid for uploading mods?
Um no. The Entity.remove() and Entity.setHealth() both take in the native entity's ID. This can be found by setting up a function inside of the entityAddedHook() to send all of the spawned mobs ID's into an array. Then when you want to remove the mobs, you can use an if statement and getEntityTypeId() on each of the items in the array (loop function) to see if they are a monster ID. If they are, then remove them using Entity.remove() and put inside the par. the Native ID of the mob from the array.
Does this make sense?
*I don't know for sure if this will work!
Can't you just do Entity.remove() with the mob variable?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI need help, because I don't know how to remove specific mobs (I know how to remove all) with ModPE Javascript. Maybe with Entity.remove(); ? But what comes in the () ?
I want to remove all monsters, but not the other mobs.
Thanks for any help!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI wanted it when the a command is used and when a option is on by modTick. That means as action.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumCan't you just do Entity.setHealth and set the mob health to 0?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThat's a good idea, can I put it so (Entity.setHealth();) in my Script and removes (kills) that all monster, or how does that work?
Does this make sense?
*I don't know for sure if this will work!
", sans-serif">Want to get paid for uploading mods?
", sans-serif">Click here
For free Bitcoins, click here!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumCan't you just do Entity.remove() with the mob variable?
", sans-serif">Want to get paid for uploading mods?
", sans-serif">Click here
For free Bitcoins, click here!