発射された弓矢の所有者を設定できない

command /shotgun:
trigger:
set {damageProjectile.%player%} to 5
set {_x} to x-coordinate of target block of player +1
set {_y} to y-coordinate of target block of player +1
set {_z} to z-coordinate of target block of player +1
set {_v} to vector from location of player to location({_x},{_y},{_z})
set vector length of {_v} to 0.8
shoot an arrow from location of player {_v}
set {_loc} to location of block above player
command /shotgun:
trigger:
set {damageProjectile.%player%} to 5
set {_x} to x-coordinate of target block of player +1
set {_y} to y-coordinate of target block of player +1
set {_z} to z-coordinate of target block of player +1
set {_v} to vector from location of player to location({_x},{_y},{_z})
set vector length of {_v} to 0.8
shoot an arrow from location of player {_v}
set {_loc} to location of block above player
11 Replies
HIBIKI
HIBIKIOP14mo ago
on projectile hit:
victim is player
broadcast "victim"
add {damageProjectile.%shooter%} to health of victim
broadcast "%{damageProjectile.%shooter%}%"
cancel event
delete event-projectile
on projectile hit:
victim is player
broadcast "victim"
add {damageProjectile.%shooter%} to health of victim
broadcast "%{damageProjectile.%shooter%}%"
cancel event
delete event-projectile
上の二つのコードを使って/shotgunコマンドによって発射された矢のダメージを{damageProjectile.%player%}を利用してon projectile hitで被害者に与える、っていうスクリプトを作ろうとしているんだけど、
shoot an arrow from location of player {_v}
shoot an arrow from location of player {_v}
このコードを使うと発射された矢の所有者が設定されない ばーじょんは1.16.5です
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
先頭をmake shootに変えてみて
HIBIKI
HIBIKIOP14mo ago
No description
HIBIKI
HIBIKIOP14mo ago
make player shootにしても似たようなエラーがでてきました Cant understand this condition/effect:
月猫ch
月猫ch14mo ago
set shooter of projectile to player 動かないっけ
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
make player shootで動かないわけなくね
月猫ch
月猫ch14mo ago
たぶんなにか別のコードが影響与えてる (23敗)
HIBIKI
HIBIKIOP14mo ago
いろいろ試してみたけどどれもだめだttあ
function shotgun(p: player, fx: integer, fy: integer, fz: integer):
tool of {_p} is netherite shovel
set {damageProjectile.%{_p}%} to 5
set {_x} to x-coordinate of target block of {_p} +{_fx}
set {_y} to y-coordinate of target block of {_p} +{_fy}
set {_z} to z-coordinate of target block of {_p} +{_fz}

set {_v} to vector from location of {_p} to location({_x},{_y},{_z})
set vector length of {_v} to 0.8
shoot arrow from location of {_p} {_v}
set {_loc} to location of block above {_p}
function shotgun(p: player, fx: integer, fy: integer, fz: integer):
tool of {_p} is netherite shovel
set {damageProjectile.%{_p}%} to 5
set {_x} to x-coordinate of target block of {_p} +{_fx}
set {_y} to y-coordinate of target block of {_p} +{_fy}
set {_z} to z-coordinate of target block of {_p} +{_fz}

set {_v} to vector from location of {_p} to location({_x},{_y},{_z})
set vector length of {_v} to 0.8
shoot arrow from location of {_p} {_v}
set {_loc} to location of block above {_p}
command /shotgun:
trigger:
shotgun(player,1,-1,1)
command /shotgun:
trigger:
shotgun(player,1,-1,1)
一応コードはこんなかんじです もう何もできない、何も感じれない
月猫ch
月猫ch14mo ago
タグ付け pls
るび
るび14mo ago
解決したらコード載せたほうがいいと思います
HIBIKI
HIBIKIOP13mo ago
うんにぃ
Want results from more Discord servers?
Add your server