#Actionbar health
1 messages · Page 1 of 1 (latest)
loop it
change it when the player's health changes
Oke
those are not correct expressions
Oh yeah just saw i thought i could use placeholderapi placeholders
you dont need to, they are already built into skript as expressions
Its %health% and %max health% yeah?
no

What?
you need to specify who's health
.
Ok bro
On heal?
Why show their health in an action bar when they already have a health bar?
and on damage
i think they want to show it continuously via while loop
It was on one server it show hp on actionbar and limited hearts to 10 in healthbar and it just looks cool
Yeah but i dont know how to use while loop
On damage and on heal wouldnt be forever?
while player is online:
do stuff
wait 10 ticks```
Action bars go away after a second
On join works?
Ohhh
yeah, but know that if you make an edit to the while code in an on join event, you will have to log off the server and on again to see the changes
Oh then bad
no they dont mean you relog to see any change, they mean you need to rejoin to trigger the on join: event, and then it will continuously update
when you edit the skript you need to rejoin
or you could make it a function and make it accessible with an command
fill in the blanks
# do stuff
command /reloadactionbar:
trigger:
dostuff(player)
on join:
while player is online:
dostuff(player)
wait 10 ticks```
The function doesnt trigger the loop though
wdym?
assuming the function sends the actionbar, the command would send the actionbar a single time
you would still need to rejoin in order for it to repeatedly send the actionbar
ohh
Like this
# do stuff
command /reloadactionbar:
trigger:
while player is online:
dostuff(player)
wait 10 ticks
on join:
while player is online:
dostuff(player)
wait 10 ticks```
i dont see why the command is needed at all though
Easy testing
easy testing for the thing you work on for about 5-10 minutes tops and never touch again
It takes as much time to leave and rejoin as it would to type the command though
And its best to test exactly what will happen when someone joins
also those while loops are gonna stack