locationA ~ locationBのエリアにplayerが入っていることを検知

するために、以下のコードを書きました
every 5 tick:
#broadcast "%blocks within location(-1000.5,4.5,3.5) and location(-1000.5,11.5,-2.5)%"
loop all players:
set {_block} to block at location at loop-player's head
blocks within location(-1000.5,4.5,3.5) and location(-1000.5,11.5,-2.5) contains {_block}
broadcast "%loop-player%"
every 5 tick:
#broadcast "%blocks within location(-1000.5,4.5,3.5) and location(-1000.5,11.5,-2.5)%"
loop all players:
set {_block} to block at location at loop-player's head
blocks within location(-1000.5,4.5,3.5) and location(-1000.5,11.5,-2.5) contains {_block}
broadcast "%loop-player%"
location(-1000.5,4.5,3.5) から location(-1000.5,11.5,-2.5) のエリアにplayerが入ったかどうかを調べるコードです エラーなし、動きませんでした… どなたかおかしな点などあったら教えてもらえませんか
5 Replies
soramame_256
soramame_2562y ago
location of (~,~,~) in world "world"
月猫ch
月猫chOP2y ago
every 5 tick:
set {_blocks::*} to blocks within location of (-1000.5,4.5,3.5) in world "w-lobby" and location of (-1000.5,11.5,-2.5) in world "w-lobby"
loop {_blocks::*}:
show end rod with speed 0.1 at location at loop-value
loop all players:
set {_block} to block at location at loop-player's head
{_blocks::*} contains {_block}
#execute console command "/mvspawn %loop-player%"
every 5 tick:
set {_blocks::*} to blocks within location of (-1000.5,4.5,3.5) in world "w-lobby" and location of (-1000.5,11.5,-2.5) in world "w-lobby"
loop {_blocks::*}:
show end rod with speed 0.1 at location at loop-value
loop all players:
set {_block} to block at location at loop-player's head
{_blocks::*} contains {_block}
#execute console command "/mvspawn %loop-player%"
こうなりました…
月猫ch
月猫chOP2y ago
every 5 tick:
set {_locA} to location(-1000.5,4.5,3.5)
set {_locB} to location(-1000.5,11.5,-2.5)
set {_blocks::*} to blocks within {_locA} and {_locB}
loop {_blocks::*}:
show end rod with speed 0.1 at location at loop-value
loop all players:
set {_block} to block at location at loop-player's head
every 5 tick:
set {_locA} to location(-1000.5,4.5,3.5)
set {_locB} to location(-1000.5,11.5,-2.5)
set {_blocks::*} to blocks within {_locA} and {_locB}
loop {_blocks::*}:
show end rod with speed 0.1 at location at loop-value
loop all players:
set {_block} to block at location at loop-player's head
こうするとエラーは出ませんが、 エリアに入ってなくても入った判定になります 己解 なぜか突然正常に動くようになりました
yukkina
yukkina2y ago
自決で草 これウザイからやめた方がいいよ
月猫ch
月猫chOP2y ago
あまりの自決に熱盛してしまった

Did you find this page helpful?