OneBlockの用にランダムなブロックを置きたいがリセットコマンドの方だけうまくいく!?

on break:
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
if event-block's location is {_loc}:
set (block at (event-block's location)) to random element out of all blocks

command /obreset:
trigger:
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
set block at {_loc} to random element out of all blocks
on break:
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
if event-block's location is {_loc}:
set (block at (event-block's location)) to random element out of all blocks

command /obreset:
trigger:
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
set block at {_loc} to random element out of all blocks
/obresetコマンドだけ正常に動作します Skript 2.7.0
Solution:
``` on break: wait 1 tick set {_loc} to location(0.5,64.5,0.5,world "oneblock") if event-block's location is {_loc}:...
Jump to solution
8 Replies
月猫ch
月猫ch15mo ago
random element out of all blocks がちゃんと取れてるかとか確認済み? 条件分岐がちゃんと動いてるかは?
nennneko5787
nennneko5787OP15mo ago
random element out of all blocksは動いてます 条件分岐がちゃんと動いてるかは? も動いてます
月猫ch
月猫ch15mo ago
set (block at (event-block's location)) to random element out of all blocks
set {_randBlock} to random element out of all blocks
set block at {_loc} to {_randBlock}
set {_randBlock} to random element out of all blocks
set block at {_loc} to {_randBlock}
とかやってみてほしい skriptは変数挟んだらうまくいったとかあるから
nennneko5787
nennneko5787OP15mo ago
だめでした
月猫ch
月猫ch15mo ago
うーん… ごめん、俺視点ではコードに不備が見受けられるわけでもないからわからない set block at {_loc} to stone とかでもだめ? あ…
Solution
月猫ch
月猫ch15mo ago
on break:
wait 1 tick
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
if event-block's location is {_loc}:
set {_randBlock} to random element out of all blocks
set block at {_loc} to {_randBlock}

command /obreset:
trigger:
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
set block at {_loc} to random element out of all blocks
on break:
wait 1 tick
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
if event-block's location is {_loc}:
set {_randBlock} to random element out of all blocks
set block at {_loc} to {_randBlock}

command /obreset:
trigger:
set {_loc} to location(0.5,64.5,0.5,world "oneblock")
set block at {_loc} to random element out of all blocks
月猫ch
月猫ch15mo ago
これやってみて
nennneko5787
nennneko5787OP15mo ago
明日か明々後日やってみる arigatou
Want results from more Discord servers?
Add your server