Hello, I looked around in the forums to see if others were having the same problem as me, but theirs were fixed by my problem.
I am working on a minecraft rpg server, which is for a specific fandom I like. I'm trying to create a battle skript, but this specific part that I'm having issues with is where I wish to have the action bar say the amount of kills each side has, as well as the time left. But it wont even appear on my action bar! I will send all of the loop for context. I am doing this in a loop that occurs every tick.
How do I fix this? Thanks for the help!
I am working on a minecraft rpg server, which is for a specific fandom I like. I'm trying to create a battle skript, but this specific part that I'm having issues with is where I wish to have the action bar say the amount of kills each side has, as well as the time left. But it wont even appear on my action bar! I will send all of the loop for context. I am doing this in a loop that occurs every tick.
Code:
every 1 tick in "DSMAP":
loop all players:
if {battle} is true:
set {battleTime} to difference between {battleTimeStart} and now
set {battleTime} to floor({battleTime})
set {battleTimeLeft} to difference between 10 minutes and {battleTime}
set {battleTimeLeft} to floor({battleTimeLeft})
if {clan::loop-player} is {yourClan}:
send action bar "&7Time left: %{battleTimeLeft}%%nl%&8&l%{yourClan}%: &6%{yourClanKills}% &8&l%{otherClan}%: &6%{otherClanKills}%" to loop-player
if {battleTimeLeft} is 0 seconds:
set {battle} to false
set {yourClanKills} to 0
set {otherClanKills} to 0
reset {battleTime}
reset {battleTimeLeft}
if {yourClanKills} > {otherClanKills}:
broadcast "&5&lStarlit &d&lForest&7&l>>&r &6&l%{yourClan}% has won the battle! &7&lGood job to all who participated, and may &b&lStarClan &7&llight your path."
reset {yourClan}
reset {otherClan}
else if {yourClanKills} < {otherClanKills}:
broadcast "&5&lStarlit &d&lForest&7&l>>&r &6&l%{otherClan}% has won the battle! &7&lGood job to all who participated, and may &b&lStarClan &7&llight your path."
reset {yourClan}
reset {otherClan}
else if {yourClanKills} = {otherClanKills}:
broadcast "&5&lStarlit &d&lForest&7&l>>&r &6&l%{otherClan}% &7&land &6&l%{yourClan}% &7&lhave tied. &7&lGood job to all who participated, and may &b&lStarClan &7&llight your path."
reset {yourClan}
reset {otherClan}
else if {clan::loop-player} is {otherClan}:
send action bar "&7Time left: %{battleTimeLeft}%%nl%&8&l%{yourClan}%: &6%{yourClanKills}% &8&l%{otherClan}%: &6%{otherClanKills}%" to loop-player"
How do I fix this? Thanks for the help!