Jump to content

Custom health thingy.


Recommended Posts

my code is:


command /sethealth:
    permission: group.op
        set player's max health to 10
on damage:
    if victim is a player:
        wait 1 ticks
        set {health2.%victim%} to victim's health
        wait 1 ticks
        set max health of victim to {health2.%victim%}

command /healthtest:
        send "Your 2nd health is %{health2.%player%}%"

The first command just brings my max health back to 10 (un tested because my max health so far stays at 10) The seconds part sets health2 to my health (which works) then sets my max health to health2 (which wont work) The second command checks if setting health2 to my current health works (which it does) The question is why will it not set my max health set to health2. I have tried using parsed as a number. I have no skript addons and I dont have any errors in console or when reloading.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...