location作成とworldの指定
every 20 tick:
set {_path} to "plugins/skript/scripts/yaml/stand_locations.yml"
loop 10 times:
if yml "stand%loop-number%" in file {_path} does not exist:
exit 2 sections
else:
set {_stand.x} to yml value "stand%loop-number%.x" from file {_path}
set {_stand.y} to yml value "stand%loop-number%.y" from file {_path}
set {_stand.z} to yml value "stand%loop-number%.z" from file {_path}
set {_stand.w} to yml value "stand%loop-number%.world" from file {_path}
set {_loc} to location {_stand.x},{_stand.y},{_stand.z} in world {_stand.w}
every 20 tick:
set {_path} to "plugins/skript/scripts/yaml/stand_locations.yml"
loop 10 times:
if yml "stand%loop-number%" in file {_path} does not exist:
exit 2 sections
else:
set {_stand.x} to yml value "stand%loop-number%.x" from file {_path}
set {_stand.y} to yml value "stand%loop-number%.y" from file {_path}
set {_stand.z} to yml value "stand%loop-number%.z" from file {_path}
set {_stand.w} to yml value "stand%loop-number%.world" from file {_path}
set {_loc} to location {_stand.x},{_stand.y},{_stand.z} in world {_stand.w}
3 Replies
該当部分↓
set {_loc} to location {_stand.x},{_stand.y},{_stand.z} in world {_stand.w}
エラーの内容です
調べた限りでは
こうすることで指定できるようですが
実際にやってみました
挙動比較
world
every 20 tick in "world name":
every 20 tick in "world name":
every 20 tick in "MAP":
set {_path} to "plugins/skript/scripts/yaml/stand_locations.yml"
loop 10 times:
if yml "stand%loop-number%" in file {_path} does not exist:
exit 2 sections
else:
set {_stand.x} to yml value "stand%loop-number%.x" from file {_path}
set {_stand.y} to yml value "stand%loop-number%.y" from file {_path}
set {_stand.z} to yml value "stand%loop-number%.z" from file {_path}
set {_stand.w} to yml value "stand%loop-number%.world" from file {_path}
{_stand.w} is "MAP"
set {_loc} to location({_stand.x},{_stand.y},{_stand.z})
set world of {_loc} to {_stand.w}
set pitch of {_loc} to random number between -180 and 180
show end rod with speed 0 at {_loc} to players where [input's world is "%{_stand.w}%"]
set {_flag} to true
loop all living entities:
"%type of loop-entity%" is "armor stand"
x location of loop-entity is {_stand.x}
y location of loop-entity is {_stand.y}-1
z location of loop-entity is {_stand.z}
world of loop-entity is {_stand.w}
set {_flag} to false
exit 1 sections
{_flag} is not false
spawnStand({_loc})
every 20 tick in "MAP":
set {_path} to "plugins/skript/scripts/yaml/stand_locations.yml"
loop 10 times:
if yml "stand%loop-number%" in file {_path} does not exist:
exit 2 sections
else:
set {_stand.x} to yml value "stand%loop-number%.x" from file {_path}
set {_stand.y} to yml value "stand%loop-number%.y" from file {_path}
set {_stand.z} to yml value "stand%loop-number%.z" from file {_path}
set {_stand.w} to yml value "stand%loop-number%.world" from file {_path}
{_stand.w} is "MAP"
set {_loc} to location({_stand.x},{_stand.y},{_stand.z})
set world of {_loc} to {_stand.w}
set pitch of {_loc} to random number between -180 and 180
show end rod with speed 0 at {_loc} to players where [input's world is "%{_stand.w}%"]
set {_flag} to true
loop all living entities:
"%type of loop-entity%" is "armor stand"
x location of loop-entity is {_stand.x}
y location of loop-entity is {_stand.y}-1
z location of loop-entity is {_stand.z}
world of loop-entity is {_stand.w}
set {_flag} to false
exit 1 sections
{_flag} is not false
spawnStand({_loc})
show end rod
無事表示
spawnStand()
無事出現
MAP
show end rod
非表示
spawnStand()
出現なし(world側の同座標に出現)
また、それぞれbroadcast "%world of {_loc}%"
してみたところ
every 20 tick in "world"
every 20 tick in "MAP"
にかかわらず、world
表示となります…
結局わからなかったので、すべての動作を一つのワールドで行うことにしました