[Artifact 1464] コール:デンキナマズの作成 - #2101
Open
firgde wants to merge 12 commits into
Open
Conversation
Lapis-LJA
requested changes
Sep 1, 2026
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 |
Contributor
There was a problem hiding this comment.
Motionを一度storageに移して、そこから数値を取得するようにすると軽くできそう
Member
Author
There was a problem hiding this comment.
storageは、リセットさえすれば適当にdeclareして使ってもよいものなのでしょうか?
Contributor
There was a problem hiding this comment.
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 |
Contributor
There was a problem hiding this comment.
1160.Cooldownをフィールドを使った実装にするとobjectivesの追加無しで実装できそう
めんどいと思うのでやらなくてもいい
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
以下のAssetを追加