Skip to content

[Artifact 1464] コール:デンキナマズの作成 - #2101

Open
firgde wants to merge 12 commits into
masterfrom
dev/firgde_1464
Open

[Artifact 1464] コール:デンキナマズの作成#2101
firgde wants to merge 12 commits into
masterfrom
dev/firgde_1464

Conversation

@firgde

@firgde firgde commented Aug 2, 2026

Copy link
Copy Markdown
Member

以下のAssetを追加

  • Artifact 1464 コール:デンキナマズ
  • Object 1160 デンキナマズ

Comment thread Asset/data/asset/functions/object/1160.electric_catfish/tick/attack.mcfunction Outdated
Comment on lines +13 to +17
execute store result score $MotionX Temporary run data get entity @s Motion[0] 100
execute store result score $MotionZ Temporary run data get entity @s Motion[2] 100

execute if score $MotionX Temporary matches ..-1 store result score $MotionX Temporary run data get entity @s Motion[0] -100
execute if score $MotionZ Temporary matches ..-1 store result score $MotionZ Temporary run data get entity @s Motion[2] -100

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Motionを一度storageに移して、そこから数値を取得するようにすると軽くできそう

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storageは、リセットさえすれば適当にdeclareして使ってもよいものなのでしょうか?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asset:context this
がOhMyDatと同じ使い方で使えるよ

Comment on lines +7 to +22
# Tick加算
scoreboard players add @s General.Object.Tick 1

# クールダウン
execute if score @s 1160.Cooldown matches 1.. run scoreboard players remove @s 1160.Cooldown 1
execute if score @s 1160.Cooldown matches 0 run tag @s remove 1160.Inactive

# 踏まれたどうかをチェック
execute unless entity @s[tag=1160.Inactive] positioned ~-0.5 ~ ~-0.5 as @e[type=#lib:living_without_player,dx=0,sort=nearest,limit=1] positioned ~ ~-0.8 ~ if entity @s[dx=0] run function asset:object/1160.electric_catfish/tick/check
execute if entity @e[tag=1160.SteppedOn,distance=..2] at @s run function asset:object/1160.electric_catfish/tick/attack

# 足元にブロックがないなら消す
execute if block ~ ~-0.1 ~ #lib:no_collision/ run scoreboard players set @s General.Object.Tick 1200

# 消滅処理
execute if score @s General.Object.Tick matches 1200.. run function asset:object/1160.electric_catfish/tick/kill

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1160.Cooldownをフィールドを使った実装にするとobjectivesの追加無しで実装できそう
めんどいと思うのでやらなくてもいい

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants