I'm trying to use a custom health system in skript. The problem im having is that the armor gives more or sometimes less than what its supposed to.
every 3 ticks:
loop all players:
if loop-player's boots is leather boots named "<dark green>Scout Boots":
set {defense.%loop-player's uuid%} to {defense.%loop-player's uuid%} + 2
set {maxhealth.%loop-player's uuid%} to {maxhealth.%loop-player's uuid%} + 20
set {speed.%loop-player's uuid%} to {speed.%loop-player's uuid%} + 100
set {health.%loop-player's uuid%} to {health.%loop-player's uuid%} + 20
wait 1 tick
set {defense.%loop-player's uuid%} to {defense.%loop-player's uuid%} - 2
set {maxhealth.%loop-player's uuid%} to {maxhealth.%loop-player's uuid%} - 20
set {speed.%loop-player's uuid%} to {speed.%loop-player's uuid%} - 100
set {health.%loop-player's uuid%} to {health.%loop-player's uuid%} - 20
is there a different approach that I could use for this?
every 3 ticks:
loop all players:
if loop-player's boots is leather boots named "<dark green>Scout Boots":
set {defense.%loop-player's uuid%} to {defense.%loop-player's uuid%} + 2
set {maxhealth.%loop-player's uuid%} to {maxhealth.%loop-player's uuid%} + 20
set {speed.%loop-player's uuid%} to {speed.%loop-player's uuid%} + 100
set {health.%loop-player's uuid%} to {health.%loop-player's uuid%} + 20
wait 1 tick
set {defense.%loop-player's uuid%} to {defense.%loop-player's uuid%} - 2
set {maxhealth.%loop-player's uuid%} to {maxhealth.%loop-player's uuid%} - 20
set {speed.%loop-player's uuid%} to {speed.%loop-player's uuid%} - 100
set {health.%loop-player's uuid%} to {health.%loop-player's uuid%} - 20
is there a different approach that I could use for this?