#The remove player from {_bar} doesn't work the second time

1 messages · Page 1 of 1 (latest)

peak lichen
#

`variables:
{buttons::%player%} = 0

on step on pressure plate:
if player is in region "uphub":
teleport player to location at 107, 64, 271
set player's yaw to 269.4
set player's pitch to 3.386
set {_bar} to boss bar with id "findup" with title "1:00" with color red with progress 100
add player to {_bar}
wait 1 second
loop 60 times:
set {_second} to 60 - loop-value
set bar title of {_bar} to "0:%{_second}%"
wait 1 second
remove player from {_bar}
send "&1You ran out of time" to player
teleport player to location at 98, 64, 257

on right click on stone button:
if player is in region "uphub":
set {buttons::%player%::%location of event-block%} to true
send "You have pressed %size of {buttons::%player%::}% buttons" to player
if size of {buttons::%player%::
} is 4:
remove player from {_bar}
teleport player to location at 98, 64, 257
send "&6Congrats! You found all four buttons under the time limit!" to player
delete {buttons::%player%::*}`

frank mountain
peak lichen
#

oh

#

how would i do it then?

frank mountain
#

use global variables

peak lichen
#

like this?
variables: {buttons::%player%} = 0 {_bar} = boss bar with id "findup" with title "1:00" with color red with progress 100
it gives an error message with it added

#

"Can't understand value 'boss bar with id "findup" with title "1:00" with color red with progress 100'`"

unique drumBOT
peak lichen
#

i get the differences between them in uses now how not seting them

#

how can i set {bar} to the same thing as a global variable because it gives a error message if i just use the same thing
{bar} = boss bar with id "findup" with title "1:00" with color red with progress 100

#

Error message: "Can't understand value 'boss bar with id "findup" with title "1:00" with color red with progress 100'`"

torpid arch
#

assuming you want a bar per player, just use something like {-bar::%player's UUID%}

peak lichen
#

that has a error with that

#

says can't understand "%player's UUID%" the problem i'm having is with seting it not the variable it self

torpid arch
#

Dont use the variables section

#

Set a global variable