mobs changing their forms in terms to their health

Started by randomdepressedweeb on

Topic category: Help with modding (Java Edition)

Last seen on 15:40, 1. Jul 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
mobs changing their forms in terms to their health
Mon, 06/27/2022 - 16:25 (edited)

hello, i want to make a mob go through stages, like when its health gets low, it transforms into another mob or even changing its model would help (but i want its attributes to change too if the model changes). an example of this is like the kimetsunoyaiba mod by orca in which some mobs change their forms in terms to their health. i know the procedure of making a new mob spawn when one dies but that is kinda lame ;-; . it would also help if you could help with procedures instead of coding since im very new to mcreator and dont know coding lol.

 

[if you are familiar with the kimetsunoyaiba mod, then one example is when muzan becomes white and has tentacles coming from his back when he's almost at 50% health and another example is kokushibo having like 4-5 stages] 

update: i was looking into procedures and found one of the templates which makes mob despawn, so i was wondering if there's any way i can make a mob despawn at a certain amount of health and spawn in a new mob?

Edited by randomdepressedweeb on Mon, 06/27/2022 - 16:25
Last seen on 11:41, 31. Mar 2024
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So, do you have trouble with…
Mon, 06/27/2022 - 16:55

So, do you have trouble with that method? Why is it lame?

Despawn, then spawn another entity is easy enough to do, and should look good enough since it happens very fast.

You just check for the entity's health every tick, or when it gets hit. Then compare if it's current health is (for example) below 50% of maximum health. If so, despawn the entity, and spawn a different one at the same coordinates.

If you're using a boss health bar, maybe keep the maximum health the same, but reduce it by half so the boss bar doesn't change - if you get what I mean.

Last seen on 15:40, 1. Jul 2022
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
damn tysm man, that was…
Tue, 06/28/2022 - 09:25

damn tysm man, that was quick <3 

i couldnt understand the checking entity's health part, howd i do it exactly?

Last seen on 01:06, 11. Sep 2022
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hazzah_ how do u do that, i…
Mon, 09/05/2022 - 05:55

Hazzah_ how do u do that, i am new