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}
上記のようなコードを書いています yamlファイルから座標とworldを取得し、locationを作製するといったものなのですが どう頑張ってもworldが指定できません world MAPの二種類があるのですが、MAPで指定してもworldになってしまいます これってどうしようもない感じですかね…?
3 Replies
Tsukineko(月雲)
該当部分↓ set {_loc} to location {_stand.x},{_stand.y},{_stand.z} in world {_stand.w}
Tsukineko(月雲)
エラーの内容です
Tsukineko(月雲)
調べた限りでは
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})
実際にやってみました 挙動比較 world 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 表示となります… 結局わからなかったので、すべての動作を一つのワールドで行うことにしました
Want results from more Discord servers?
Add your server
More Posts
アーマースタンドの向きアーマースタンドの向きってどうやって変えればいいですか…? ``` spawn armor stand at {_loc} ~ vector 0,-1,0 with nbt "{Invisチェストその他もろもろ方向が存在するブロックについてこいつらを指定した向きに設置する方法が知りたいでやんす… あと、設置済みのチェストの方向を調べる方法も弓を引くモーションプレイヤーに、特定のアイテムを持っている間、ずっと弓を最大限引いたモーションを取らせたいです。 パケットの知識とか0なのですが、なにとぞ案などあれば教えていただけないでしょうか。skBee読み込まれない問題画像のような構成でskriptいじってますが、skbeeが反映されません 2.5.4のskbee入れてます 最新verでも動きませんでした これ適応verかなんかあります?長押しの検知いや、わかってるんですよ 多分無理だろうなって… 現状右クリック長押しで一秒間に5回判定されることが分かりました これを毎ティックチェックする方法ありますかHUDを追加する画面右下に文字を表示させるとかできる…?CSの実装についてCrackShot君は同じ銃でも、アイテムごとに銃の性能(残弾数)が違ったり 地面にポイして拾ってもデータが保存されていますが あれはどうやってデータ保存してるんですかね アイテムに固有IDでもあるんカスタムguiを開きながらインベントリのアイテムクリックを検知するこういうものを書いてみたのですが、インベントリ内の種をクリックしたときもaと言ってくれません... ``` on inventory click: if name of clicked invenchatのリンククリックについて```on chat: cancel event send "%message%" to player``` このコードで送られるメッセージにリンクがあった場合そのリンクを開くことがで使ってるskriptのバージョンいくつですか?気になったので質問しました あと、2.6.3だとうまく動かない?みたいなときもあって