#(JustinS) Set health
47 messages · Page 1 of 1 (latest)
(JustinS) Set health
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
!m health
Multiple possible mechanisms: EntityTag.health, EntityTag.max_health, PlayerTag.fake_health, EntityTag.health_data, PlayerTag.health_scale, PlayerTag.scale_health, EntityTag.absorption_health, PlayerTag.fake_mount_health, PlayerTag.fake_entity_health, PlayerTag.fake_absorption_health.
Did you mean to search for command health?
!m entitytag.health
Sets the amount of health the entity has.
The entity must be living.
EntityTag
ElementTag(Decimal)
<EntityTag.health> Returns the current health of the entity.
<EntityTag.health_max> Returns the maximum health of the entity.
if you want to change the maximum health of the player then you can use the health command
I get that but how do you change the health in a script, like this?
- <player.health> = <[goal]>
When I do that, the player.health part gets underlined red
!c adjust
core
adjust [<ObjectTag>/def:<name>|...] [<mechanism>](:<value>)
Adjusts an object's mechanism.
Many object tag types contains options and properties that need to be adjusted.
Denizen employs a mechanism interface to deal with those adjustments.
To easily accomplish this, use this command with a valid object mechanism, and sometimes accompanying value.
Specify "def:<name>" as an input to adjust a definition and automatically save the result back to the definition.
You can optionally adjust a MapTag of mechanisms to values.
To adjust an item in an inventory, use !command inventory...
!guide
View the Denizen Beginner's Guide at https://guide.denizenscript.com/
Denizen doesn't use = for equals. it uses ==
👌 awesome, thanks!
but with this
you need to adjust
i know penguin already brought up the guide, but i'm going to bring up a specific section on how the adjust command works
!guide the adjust command
View the guide page 'Common Mistakes - The Adjust Command Is Not For Items/Materials/Etc.' at: https://guide.denizenscript.com/guides/troubleshooting/common-mistakes.html#the-adjust-command-is-not-for-items-materials-etc
Hm it doesn't seem to be working. The narrate works alright, but the health doesn't get set to the goal
- adjust <player.health> <[goal]>
<player.health> is a tag
health is the mechanism name
here is an example of an adjust command usage (taken from the meta):
- adjust <server.online_players> skin:Notch
<server.online_players> is the object being adjusted
skin is the mechanism
Notch is the new value
so now all the players online will have the skin of Notch
you can do the same with player health