Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mob Display Health #338

Open
IceWolf23 opened this issue Sep 18, 2022 · 0 comments · May be fixed by #365
Open

Mob Display Health #338

IceWolf23 opened this issue Sep 18, 2022 · 0 comments · May be fixed by #365
Labels
enhancement New feature or request

Comments

@IceWolf23
Copy link

Mob Display Health - Script

When a player hits any entity, the Mob Type is displayed with the remaining life (in HP) in the actionbar

__on_player_deals_damage(player, amount, entity) -> (
    
    entity_hp = format('r '+round(query(entity, 'Health')));
    _entityHealth = (number(entity_hp)-number(floor(amount)));
    if (
        _entityHealth < 0, (
            _entityHealth = 0
        )
    );
    text_string = (format('w '+entity)+format('g  » ')+format('r '+_entityHealth+' ❤'));
    display_title(player, 'actionbar', text_string);

    return()
);

image

@IceWolf23 IceWolf23 added the enhancement New feature or request label Sep 18, 2022
@Ghoulboy78 Ghoulboy78 linked a pull request Feb 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant