Get/set entity attributes procedure blocks

Upvotes: 12
Issue description

Hi. I'd searched THIS in others tickets, but not found, so I post here:

I propose to implement possibility setting of max health(numbers of hearts) for players and eventually for other entities. But especially for players.
By this, I mean procedures like a "get entity maxHealth" and "set enity maxHealth". And this without unessesary use HealthBoost potion effect.

 

This can be a useful for creating more RPG style mods and more difficut style game ex. player start with two hearts(4 hp) or can just lose max HP for some punish.

Also if player beat some boss, then next time this boss can spawn with more healt points, etc.

This suggestion might applies for other entity's atributies like maxDamage, etc.

Issue comments

Developer Submitted by Klemen on Sat, 08/17/2019 - 17:26

We will add support for changing entity attributes in the future updates. Nice idea!

Thank for appreciation. :)

 

I strongly vote for this solution too:

https://mcreator.net/tracker/issue/50761

I will not post new post about this since this is already, but I'll be very glad if this will be found too.

So I have some other ideas, that I'll post soon(if don't exist already).

This would be so useful for many things, especially potion effects :)

Submitted by Crawler on Thu, 09/05/2019 - 21:45

If you want to get the max entity health atm you can do it by adding a procedure block? (is that how you call them?) like this

https://500px.com/photo/1002369170/procedure-by-Be-Human

then locking the code and changing the "getHealth()"  with a "getMaxHealth()" manually in the lines that require it i.e.

https://500px.com/photo/1002369207/code1-by-Be-Human

in this case I'm checking if the entity is at 30% of its max health or lower and if it is at the time it's hit by the sword it will deal extra damage but yeah it could be nice to get an "entity max health" block for people that can'r really mess with code.

Your way is half solution and it work only below real max health of entity and still remaining a some empty hearts.
Thing whose I care a most is possibility to increase max health of player above "factory setting" of entities. And especially for player above standard of 20 hp(10 hearts).
For exmample you find a heart container in some dungeon, then does eat it and you will get a extra max heart(2 hp) of max health. Then you can be healed to 22 hp instead 20. And so on.