Entity Meta - Health (Expression) — skPackets

Addon: skPackets · Category: Expression · Since: 1.0.0

Syntax

[the] [(fake|packet)] [entity] meta [field] (hp|health) of %entitymeta%

Description

The living entity health metadata value. Value type: Number. Applies to livingentity and supported subclasses. Supports set. When editing metadata copied from a packet, set packet meta back to the edited object.

Examples

command /healthy-mob:
    trigger:
        set {_mob} to a new fake zombie entity:
            location: location of player
            viewers: player
        set {_meta} to fake entity meta data of {_mob}
        set meta health of {_meta} to 20
        wait 5 seconds
        kill fake entity {_mob}

View source