吹っ飛ばしのやり方が分からない

loop entities in radius {_damage} around {_P}: set {_K} to location of loop-entity push loop-entity direction from {_P} to {_K} if loop-entity is not player: set {last_attack.%loop-entity%} to player damage loop-entity by {_damage} このコードのpushのところでエラーが出ます。
13 Replies
かずてぃず
かずてぃずOP3mo ago
{_K}が{_Pから離れていれば離れているほど吹っ飛ばしが弱くなってほしいです} theres no loop matches "loop-entity direciton from ~~" tteera-gadetemasu
月猫ch
月猫ch3mo ago
まずはコードをコードブロックで囲みましょう
loop entities in radius {_damage} around {_P}:
set {_K} to location of loop-entity
push loop-entity direction from {_P} to {_K}
if loop-entity is not player:
set {last_attack.%loop-entity%} to player
damage loop-entity by {_damage}
loop entities in radius {_damage} around {_P}:
set {_K} to location of loop-entity
push loop-entity direction from {_P} to {_K}
if loop-entity is not player:
set {last_attack.%loop-entity%} to player
damage loop-entity by {_damage}
あとdirection from {_P} to {_K}とはなんぞや vectorじゃね
月猫ch
月猫ch3mo ago
directionってfrom構文あるのか 普段使わんから初見
かずてぃず
かずてぃずOP3mo ago
a なるほど
loop entities in radius {_damage} around {_P}:
set {_K} to location of loop-entity
push loop-entity direction from {_P} to {_K}
if loop-entity is not player:
set {last_attack.%loop-entity%} to player
damage loop-entity by {_damage}
loop entities in radius {_damage} around {_P}:
set {_K} to location of loop-entity
push loop-entity direction from {_P} to {_K}
if loop-entity is not player:
set {last_attack.%loop-entity%} to player
damage loop-entity by {_damage}
かずてぃず
かずてぃずOP3mo ago
Yahoo!知恵袋
マイクラのskriptについての質問です効率強化1のついた棒を持ってエンティティを右クリックするそのエンティティを自分のいる方向に向....
マイクラのskriptについての質問です効率強化1のついた棒を持ってエンティティを右クリックするそのエンティティを自分のいる方向に向かって吹っ飛ばすというのを作りたいのですが以下のskript onrightclickwithstick:ifevent-itemisenchantedwithefficiency:pushthetargetedentityforwardtoplayeratspeed1だと3行目...
___
___3mo ago
(push|thrust) %entities% %direction% [(at|with) (speed|velocity|force) %number%] at speed %number%を指定すれば量は変えられる https://skripthub.net/tutorials/31 {a.%player%}みたいにドットで区切るんじゃなくてリスト変数使おう *が付いて無ければどっちもhashmap参照だからa.ba::bの参照速度に差はないけど前者は利便性とか保守性の点で劣るから使う理由はない リスト変数の使い方の例はpscのAnswerOverflowにたくさんある https://search.yahoo.co.jp/search?p=site%3Awww.answeroverflow.com+リスト変数
かずてぃず
かずてぃずOP3mo ago
アドバイスありがとうございます! theres no loop matches "loop-entity direciton from ~~" のエラーはどう解消されますか? 構文は合ってる気がするのですが speedって絶対つけないとダメですか?
___
___3mo ago
Skript Hub - Documentation
Skript Hub - Documentation
Skript Hub is the best place to get the latest Skript and Addon Documentation. Skript Hub has the fastest documentation system with offline and mobile support for the best Minecraft development experience.
月猫ch
月猫ch3mo ago
普通にvectorにすればええやんかぁ!!
___
___3mo ago
冗長になるだけじゃないの スレ主がベクトル使ったらhttps://discord.com/channels/545926404785569793/1282338651602157578/1283752350925848709 こうなるよ
set {_pv} to vector of {_p}
set {_kv} to vector of {_k}
set {_px} to x of {_pv}
set {_py} to y of {_pv}
set {_pz} to z of {_pv}
set {_kx} to x of {_kv}
set {_ky} to y of {_kv}
set {_kz} to z of {_kv}
set {_dx} to {_kx} - {_px}
set {_dy} to {_ky} - {_py}
set {_dz} to {_kz} - {_pz}
set {_l} to sqrt({_dx}^2 + {_dy}^2 + {_dz}^2) / 2
set {_dx} to {_dx} / {_l}
set {_dy} to {_dy} / {_l}
set {_dz} to {_dz} / {_l}
set velocity of {_k} to vector({_dx}, {_dy}, {_dz})
set {_pv} to vector of {_p}
set {_kv} to vector of {_k}
set {_px} to x of {_pv}
set {_py} to y of {_pv}
set {_pz} to z of {_pv}
set {_kx} to x of {_kv}
set {_ky} to y of {_kv}
set {_kz} to z of {_kv}
set {_dx} to {_kx} - {_px}
set {_dy} to {_ky} - {_py}
set {_dz} to {_kz} - {_pz}
set {_l} to sqrt({_dx}^2 + {_dy}^2 + {_dz}^2) / 2
set {_dx} to {_dx} / {_l}
set {_dy} to {_dy} / {_l}
set {_dz} to {_dz} / {_l}
set velocity of {_k} to vector({_dx}, {_dy}, {_dz})
スレ主風に書いたら1行が16行になった
月猫ch
月猫ch3mo ago
😭😭😭😭😭 前々から「vectorで構文調べて一通り目を通せ」言うてるのに まあskQueryは便利だからまずそれは入れて貰って それはそうとして、構文を調べて貰う方針で
かずてぃず
かずてぃずOP3mo ago
なるほどありがとうございます! 調べが甘くてすみません、、自分の力でどうにかできるよう努力します。
Want results from more Discord servers?
Add your server