Ceroi 6d10bf9e7682449694fded3e69fdb3f3
이해도 | 1.12 |
---|---|
게임버전 (JE) | 스피곳 |
게임버전 (BE) | 모르겠습니다 |
스크립트 애드온 | 2.4 |
command /광장1채널:
trigger:
send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&f&l5초뒤 광장 1채널로 이동됩니다!" to player for 1 seconds
wait 1 seconds
send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●&f&l⃛✩⃛⃛" to player for 1 seconds
wait 1 seconds
send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●&f&l✩⃛⃛" to player for 1 seconds
wait 1 seconds
send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●●&f&l⃛⃛" to player for 1 seconds
wait 1 seconds
send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●●●&f&l⃛" to player for 1 seconds
wait 1 seconds
send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●●●●" to player for 1 seconds
wait 1 seconds
send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&f&l성공적으로 광장 1채널로 이동하였습니다!" to player for 1 seconds
execute console command "/spawn %player%"
이런 명령어로 광장을 가게하는데 움직이면 취소되게 어떻게하나요?
서재형
2020.08.07(SkQuery를 깔아야합니다.)
command /광장1채널: trigger: set {%player%.이동} to 0 send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&f&l5초뒤 광장 1채널로 이동됩니다!" to player for 1 seconds wait 1 seconds if {%player%.이동} is 1: delete {%player%.이동} exit send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●&f&l⃛✩⃛⃛" to player for 1 seconds wait 1 seconds if {%player%.이동} is 1: delete {%player%.이동} exit send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●&f&l✩⃛⃛" to player for 1 seconds wait 1 seconds if {%player%.이동} is 1: delete {%player%.이동} exit send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●●&f&l⃛⃛" to player for 1 seconds wait 1 seconds if {%player%.이동} is 1: delete {%player%.이동} exit send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●●●&f&l⃛" to player for 1 seconds wait 1 seconds if {%player%.이동} is 1: delete {%player%.이동} exit send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&a&l●●●●●" to player for 1 seconds wait 1 seconds if {%player%.이동} is 1: delete {%player%.이동} exit send title "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" with subtitle "&f&l성공적으로 광장 1채널로 이동하였습니다!" to player for 1 seconds execute console command "/spawn %player%" on every movement: if {%player%.이동} is set: set {%player%.이동} to 1
될거에요!
아마도...Ceroi
2020.08.16흠 안되네용 ㅠ
스크립터브혼
2020.08.07command /광장1채널: trigger: set {_title} to "&6&o&l[ &f&o&lBTH System &6&o&l] &f&l" set {_time} to 5 set {_location} to location of player send title {_title} with subtitle "&f&l5초뒤 광장 1채널로 이동됩니다!" to player for 1 seconds loop {_time} times: wait 1 seconds if {_location} is location of player: if loop-number < {_time}: set {_rest} to {_time} - loop-number send title {_title} with subtitle "&f&l%{_rest}%초" to player for 1 seconds else: send title {_title} with subtitle "&f&l성공적으로 광장 1채널로 이동하였습니다!" to player for 1 seconds execute console command "/spawn %player%" else: stop
타이머 시작 전에 플레이어의 위치를 저장한 후, 타이머 동작마다 저장된 위치와 실제 플레이어의 위치가 같은지 비교하면 됩니다.
반복적으로 실행되는 타이머의 경우 반복문(loop, while)을 사용하시는 것이 가독성과 유지보수에 유리합니다.
위 코드에는 4초, 3초... 이런식으로 남은 시간을 보여주는데 작성자께서 하고싶으신 특수문자를 사용한 메세지를 보내고 싶으시다면,
먼저 반복문을 학습하시고 방법을 찾아보시기 바랍니다.