【plugin2.5】受到伤害显示(可变化)//ダメージ表示機能(可変式)//Damage Display (Dynamic Version)

使用方法:

显示伤害2.5版本.gd (22.1 KB)

1.创建node2d,node2d下创建label节点
2.在node2d上挂载脚本
3.把脚本复制进去
4.点击node2d,在右侧选择根节点

其他参数可以调

额外:感谢官方的更新喵!这下子终于靠AI做出了动态伤害显示了喵!
我是使用开关的无敌状态开关来触发显示伤害文本动画
有无敌时间(冷却)间隔来间隔生成文本
最后谢谢官方喵!

2.5:
1.现在切换场景后也可以受击后出现文本了喵,包括接触传送门和用场景连线切换
2.包括预先放在场景里的对象
3.在右侧的act game mker 兼容模式,只需要在【use act game maker】和【auto detect scene changes】打勾就行了(或者全部用默认)

更新脚本的方式
1.先关闭已经添加过的其他对象场景
2.将脚本复制替换原脚本
3.这样就可以自动让其他已经加载了这个脚本的场景恢复至默认值
4.如果在打开场景情况下需要手动更改

///

JP:

ダメージ表示2.5.gd (22.9 KB)

使用方法

  1. Node2D を作成し、その配下に Label ノードを作成する

  2. Node2D にスクリプトをアタッチする

  3. スクリプトの内容をコピーして貼り付ける

  4. Node2D を選択し、画面右側の設定からルートノードを指定する

その他のパラメータは適宜調整可能です。

補足公式アップデートありがとうございますにゃ!これでついに AI を活用して動的ダメージ表示が実装できましたにゃ!私は無敵状態のスイッチ機能を利用して、ダメージテキストのアニメーショントリガーを設定しています。無敵時間(クールダウン)の間隔を利用して、テキストの生成間隔を調整しています。最後に、改めて公式に感謝ですにゃ!

2.5:

  1. シーン切り替え後もヒットを受けた際にダメージテキストが表示されるようになりましたにゃ。ポータルでの移動や、シーン接続機能によるシーン切り替えの場合も対応しています。

  2. あらかじめシーン内に配置されているオブジェクトにも対応しています。

  3. 右パネルの「Act Game Maker 互換モード」を使用する場合、【Act Game Maker を使用する】と【シーン切り替えを自動検知】にチェックを入れるだけで OK です(または全てデフォルト設定でも問題ありません)。

スクリプトの更新方法

  1. まず、このスクリプトを追加済みの他のオブジェクトシーンをすべて閉じてください。

  2. 新しいスクリプトをコピーし、元のスクリプトと置き換えます。

  3. これにより、当該スクリプトを読み込んでいる他のすべてのシーンが自動的にデフォルト値にリセットされます。

  4. シーンを開いた状態で更新する場合は、手動で設定を変更する必要があります。

///

EN:

Damage show2.5.gd (22.3 KB)

How to Use

  1. Create a Node2D, then add a Label node as its child

  2. Attach the script to the Node2D

  3. Copy and paste the script content into it

  4. Select the Node2D and specify the root node in the right-side panel

Other parameters are adjustable as needed.

Extra NotesThanks for the official update, meow!Finally, I managed to make a dynamic damage display with AI, meow!I use the invincibility toggle to trigger the damage text animation.The invincibility cooldown interval is used to control the spawn rate of the damage text.Thanks again to the official team, meow!

2.5:

  1. Now damage text will pop up on taking hits even after scene switching, including when teleporting via portals or switching scenes through scene connections.

  2. This also applies to objects pre-placed in the scene.

  3. For the Act Game Maker Compatibility Mode on the right panel, simply check the boxes for [Use Act Game Maker] and [Auto Detect Scene Changes] (or keep all settings as default).

How to Update the Script

  1. First, close all other object scenes that have already imported this script.

  2. Copy the new script and replace the original one.

  3. This will automatically reset all scenes that have loaded this script to their default values.

  4. If the target scene is open during the update, you need to make the changes manually.

2 Likes

另外可以用AI翻译一下注释喵,也希望能更精简一下喵

※AI でコメント翻訳も可能ですにゃ

※AI can also translate the comments, meow

1 Like

另外感谢**Justus喵,提供了旋转脚本喵**

1 Like

厉害!:hand_with_index_finger_and_thumb_crossed: :hand_with_index_finger_and_thumb_crossed: :hand_with_index_finger_and_thumb_crossed:

重新增加了一下自定义字体,label还有小数位可以自定义功能喵,同时删除了输出到控制台提示喵

「カスタムフォント、Label、小数点桁数のカスタマイズ機能を追加しましたにゃ!同時にコンソールへの出力表示も削除しましたにゃ!」

“I added custom font, Label, and customizable decimal place features meow! Also removed the console output prompts meow!”

1 Like

2.0

新增功能:
1.对象消失时候,文本也会跟着消失
2.增加了自定义文本动画时间调整
3.增加了曲线动画

New Features Added:

  1. Text will disappear synchronously when the target object is removed from the scene.

  2. Added support for customizing text animation duration for more flexible visual tuning.

  3. Integrated curve-based animation system to enable smoother and more dynamic text motion effects.

追加機能:

  1. 対象オブジェクトがシーンから消滅した場合、ダメージテキストも同時に消滅します。

  2. テキストアニメーションの時間調整機能を追加し、視覚表現の自由度を向上させました。

  3. カーブアニメーションシステムを導入し、より滑らかでダイナミックなテキストの動きを実現します。

1 Like

2.2

1.增加了自定义颜色渐变
2.在受到暴击情况下优先生成暴击文本
3.自定义暴击文本和颜色渐变

///

  1. カスタムカラーグラデーション機能を追加

  2. クリティカルヒット発生時、クリティカルテキストを優先的に生成するように調整

  3. クリティカルテキストとカラーグラデーションをカスタマイズ可能に対応

///

  1. Added support for custom color gradients

  2. Prioritized critical text generation when a critical hit is detected

  3. Enabled customization of critical text and its color gradient

1 Like

2.3
增加了自定义帧数FPS检测
如果Use Custom Detection Frequency = :check_mark:
那么优先使用Detection Frequency的默认帧数
如果Detection Frequency=0
那么会使用自定义Detection Interval Frames
如果Detection Frequency=3
那么会忽略自定义Detection Interval Frames
动作游戏推荐1-3帧,中等规模推荐3-5帧,弹幕游戏推荐5帧以及5帧以上(可以配合单位的无敌时间来调整检测帧数间隔)

///

2.3 Custom FPS Detection AddedIf Use Custom Detection Frequency is enabled:

  • The Detection Frequency value will take priority.

  • If Detection Frequency is set to 0, the custom Detection Interval Frames will be used instead.

  • If Detection Frequency is set to 3, the custom Detection Interval Frames will be ignored.

Recommended Settings:

  • Action Games: 1–3 frames

  • Medium-scale Games: 3–5 frames

  • Bullet Hell Games: 5+ frames (You can adjust the detection interval according to the invincibility duration of in-game entities.)

///

2.3 カスタム FPS 検出機能の追加カスタム検出頻度を使用を有効にした場合:

  • 検出頻度(Detection Frequency) の値が優先的に適用されます。

  • 検出頻度0 に設定した場合、代わりにカスタム検出フレーム間隔(Detection Interval Frames) が使用されます。

  • 検出頻度3 に設定した場合、カスタム検出フレーム間隔 は無視されます。

推奨設定値:

  • アクションゲーム: 1~3 フレーム

  • 中規模ゲーム: 3~5 フレーム

  • 弾幕系ゲーム: 5 フレーム以上(ゲーム内キャラクターの無敵時間に合わせて、検出フレーム間隔を調整可能です)

2 Likes

2.4
优化了代码数量,默认文本改为了16大小

2.4コード量を最適化し、テキストのデフォルトサイズを 16 に変更しました。

2.4Optimized the code volume and changed the default text size to 16.

1 Like