set damage to %integer% が使えない

set damage to 0などとすると use attacker or victim in ~~~ とエラーします...
21 Replies
Melonium
Melonium11mo ago
No description
Melonium
Melonium11mo ago
Addons:
No description
chinatukano
chinatukano11mo ago
該当部分のコードがないとなんでそうなるのかわからない
Melonium
Melonium11mo ago
on damage:
if damage cause is fall:
cancel event
stop
if {join::*} do not contain victim:
if {join::*} do not contain attacker:
if attacker is not a player:
stop
cancel event
stop
if victim is a skeleton:
if name of attacker's tool contains "スケ狩り剣":
set the damage to 5000
set {_tttt} to "%uncolored name of attacker's held item%"
set {_leng} to (length of {_tttt}) - 7
set {_tttt} to last {_leng} character of {_tttt}
set {_saas::*} to {_tttt} split at "/"
set {_datas} to {_saas::1} parsed as integer
remove 1 from {_datas}
if {_datas} is 0:
remove 1 of attacker's held item from attacker
set name of attacker's tool to "&9スケ狩り剣 &7(%{_datas}%/30)"
stop
set the damage to 3
set victim's invulnerability ticks to 5
if damage cause is a projectile:
if metadata value "stun" of event-projectile is true:
apply blindness 5 without particles to victim for 5 second
apply slowness 40 without particles to victim for 5 second
Stun(victim)
if attacker's held item is {item::axe}:
set {_us} to hotbar slot of attacker
play sound "item.totem.use" with volume 2 at location of victim for all players in radius 5 around victim
set the damage to 3000
if {limitaxe} is true:
if {night} is not set:
wait 1 tick
set {_sl} to 0
loop 45 time:
if {_sl} is {_us}:
continue loop
if slot {_sl} of attacker is {item::axe}:
set slot {_sl} of attacker to {item::noaxe}
add 1 to {_sl}
if damage cause is a projectile:
if event-projectile is an arrow:
set the damage to 3000
on damage:
if damage cause is fall:
cancel event
stop
if {join::*} do not contain victim:
if {join::*} do not contain attacker:
if attacker is not a player:
stop
cancel event
stop
if victim is a skeleton:
if name of attacker's tool contains "スケ狩り剣":
set the damage to 5000
set {_tttt} to "%uncolored name of attacker's held item%"
set {_leng} to (length of {_tttt}) - 7
set {_tttt} to last {_leng} character of {_tttt}
set {_saas::*} to {_tttt} split at "/"
set {_datas} to {_saas::1} parsed as integer
remove 1 from {_datas}
if {_datas} is 0:
remove 1 of attacker's held item from attacker
set name of attacker's tool to "&9スケ狩り剣 &7(%{_datas}%/30)"
stop
set the damage to 3
set victim's invulnerability ticks to 5
if damage cause is a projectile:
if metadata value "stun" of event-projectile is true:
apply blindness 5 without particles to victim for 5 second
apply slowness 40 without particles to victim for 5 second
Stun(victim)
if attacker's held item is {item::axe}:
set {_us} to hotbar slot of attacker
play sound "item.totem.use" with volume 2 at location of victim for all players in radius 5 around victim
set the damage to 3000
if {limitaxe} is true:
if {night} is not set:
wait 1 tick
set {_sl} to 0
loop 45 time:
if {_sl} is {_us}:
continue loop
if slot {_sl} of attacker is {item::axe}:
set slot {_sl} of attacker to {item::noaxe}
add 1 to {_sl}
if damage cause is a projectile:
if event-projectile is an arrow:
set the damage to 3000
set damage to だけ全てエラー出ます
Tsukineko(月雲)
cancel the event があるから…とか? stopで止めてるのはわかるんやけど elseでちゃんと条件分岐して 明確に避けてあげればワンちゃんとかない?
chinatukano
chinatukano11mo ago
on damage: set damage to 0 とかでやってエラー出ないならcancel event原因っぽいけど
Melonium
Melonium11mo ago
エラーなしでした... kore
chinatukano
chinatukano11mo ago
damage取得してset healthとかすれば いけそう
Yeahn
Yeahn11mo ago
それ死んだときの挙動おかしくなるからやめたほうがいい なんか半分死んでるみたいな 状況になる
chinatukano
chinatukano11mo ago
これvictimスケルトンの時しかやってないから大丈夫じゃない? 下の方プレイヤーかな
Yeahn
Yeahn11mo ago
held item is {item::axe} の部分から人じゃないの?
Melonium
Melonium11mo ago
if {join;;*} ... からplayer です
Tsukineko(月雲)
まじでon deathでhealthいじると10000%バグるからお勧めしない これ、気が向いたらためせます?
Yeahn
Yeahn11mo ago
SKのことだから theありなしで変わったりもしそう
Yeahn
Yeahn11mo ago
これスケルトンに斧で殴り掛かったら2個発火しない?w
chinatukano
chinatukano11mo ago
条件分岐わけるならelse if使ったほうがきれいだよ
Melonium
Melonium11mo ago
iketazoooooooooo みなさんありがとう!
Yeahn
Yeahn11mo ago
しいて言うのであれば
Yeahn
Yeahn11mo ago
Yeahn
Yeahn11mo ago
ここまでまだ添削できます
Want results from more Discord servers?
Add your server
More Posts
location(x,y,z,world "world")でworldが動いてないサーバーのメインワールドは`w-lobby-new` mvでworldを増やし ```set {_loc} to location(x,y,z,world "w-lobby") teleport plMinecraftHeadsなどで気に入った頭を装備したアーマースタンドを頭を傾けた状態でスポーンさせる方法NBTを使えばいけそうな感じっていうのはわかるんですが、NBTで頭を指定する方法がよくわかってないのでご教示願いたいです。雪玉が貫通されないそもそも``on projectile collide``がキャンセル不可な可能性もありますけどね ``` on projectile collide: if event-entity is armor standの頭だけを発光させたい``` set {_pLoc} to player's head's location spawn armor stand at ({_pLoc} ~ vector(0, -1.125銃skの改善点指摘してほしい初心者のぼくが初めてまともに書いたskということで30発入りSMGを3発ずつ撃ててリロードもできるskです。一応動きます。 変数の使い方とかマジで色々汚いと思いますが「こう書いたらいいよ」とか温かく教vectorの使い方vectorの使い方がぜんっぜんわかりませんsorted LIST のなぞきょどうについて``` set {_sortedKey::*} to indexes of {_areaIDs::*} set {_sortedKey::*} to sorted {アマスタの完全透明化{Invisible:1b,Marker:1b}のnbtをつけたアマスタをプレイヤーに乗せているのですが、スペクテイターにすると見えてしまいます これを見えなくする方法を教えてください PR 1.12GUI内のアイテムをnbtを指定したいGUI内のアイテムをHideFlagsとか指定して 鉄剣とかの利き手に持った時とかの表示を消したい(HideFlags)sk勉強する時に分かりやすいサイトとかおすすめあったら教えてください圧倒的初心者ですおねがいします