이해도 | 1.12 |
---|---|
게임버전 (JE) | 버킷 |
스크립트 버전 | 입문자(아무것도 몰라요) |
스크립트는 잘 모르지만 만두민님 강의보고 짜보았습니다. 위에 돈 추가 삭감하는 부분은 잘 되는데
제가 이걸 스코어보드로 오른쪽에 유저마다 얼마 있는지 보여주는걸 하고싶어서요.
스코어보드쪽이 궁금한데 set score "돈 : %{%player%.money}%" in sidebar of loop-player to 1 여기서 에러가 나더라구요.
혹시 어떻게 해야하는지 도와주실 분 계실까요?
만두민님 강의에서는 1초마다 반복이었는데 플레이어의 돈이 증가, 감소할때마다 스코어보드가 새로고침되는 방법도 알고싶습니다
-----------------------------------------------------------------------------------------------------------------------------------------
command /돈 [<string>] [<integer>]:
trigger:
if arg 1 is "추가":
if player is op:
add arg 2 to {%player%.money}
message "돈이 %arg 2%원만큼 증가했습니다."
else:
message "추가 불가"
if arg 1 is "삭감":
if player is op:
subtract arg 2 from {%player%.money}
message "돈이 %arg 2%원만큼 줄었습니다."
else:
message "삭감 불가"
every 1 seconds:
loop all players:
if {scoreboard.%loop-player%} is true:
wipe loop-player's sidebar
set name of sidebar of loop-player to "지갑"
set score "돈 : %{%player%.money}%" in sidebar of loop-player to 1
command /지갑 [<string>]:
trigger:
if arg 1 is "열기":
set {scoreboard.%player%} to true
if arg 1 is "닫기":
set {scoreboard.%player%} to false
wipe player's sidebar
DDang_
2021.07.06돈.%loop-player%
뚱땅이
2021.07.07감사합니다!!
스크립터브혼
2021.07.07밑줄친 부분을 바꾸시면 됩니다.
위 코드가 1초마다 플레이어의 스코어 보드를 적용하는 코드입니다.
스코어 보드에 사용되는 변수들이 변경 될 때 마다 해당 코드를 실행하면 됩니다.
이런 식으로요.
뚱땅이
2021.07.07감사합니다!!