Is it possible to keep maxHealth of DTM after death?

Started by Jinbaili on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to keep maxHealth of DTM after death?

Hey guys,

 

I'm trying to make heart containers which add 1 heart each time I eat one. That part is a succes. Now I got a problem with the maxHealth when I die and I can't figure how to keep the extra hearts when I respawn. They just disappear as if they never existed.

Does someone know a way to fix this?

Here is my current procedure:

https://gyazo.com/a6fb3b2049854e71c315ac3260ebeaef

- Kimberly

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Persistent variables.  I…
Sat, 09/04/2021 - 10:37

Persistent variables. 

I think they are currently only in 1.16. I could be wrong about that.

 

Chew

 

 

 

 

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Don't know how to use the…
Tue, 09/07/2021 - 14:41

Don't know how to use the persistent variables propperly and can't find a thread where it is explained, so I tried this and it didn't work, when I'd die I still lost the health. Can you or someone else help me out?

Here is my current procedure (I'd use GLOBAL_SESSION as a variable):

https://gyazo.com/4fed4d272dbd4f64b529affdfae564b6

- Kimberly