使用方法:
显示伤害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)
使用方法
-
Node2D を作成し、その配下に Label ノードを作成する
-
Node2D にスクリプトをアタッチする
-
スクリプトの内容をコピーして貼り付ける
-
Node2D を選択し、画面右側の設定からルートノードを指定する
その他のパラメータは適宜調整可能です。
補足公式アップデートありがとうございますにゃ!これでついに AI を活用して動的ダメージ表示が実装できましたにゃ!私は無敵状態のスイッチ機能を利用して、ダメージテキストのアニメーショントリガーを設定しています。無敵時間(クールダウン)の間隔を利用して、テキストの生成間隔を調整しています。最後に、改めて公式に感謝ですにゃ!
2.5:
-
シーン切り替え後もヒットを受けた際にダメージテキストが表示されるようになりましたにゃ。ポータルでの移動や、シーン接続機能によるシーン切り替えの場合も対応しています。
-
あらかじめシーン内に配置されているオブジェクトにも対応しています。
-
右パネルの「Act Game Maker 互換モード」を使用する場合、【Act Game Maker を使用する】と【シーン切り替えを自動検知】にチェックを入れるだけで OK です(または全てデフォルト設定でも問題ありません)。
スクリプトの更新方法
-
まず、このスクリプトを追加済みの他のオブジェクトシーンをすべて閉じてください。
-
新しいスクリプトをコピーし、元のスクリプトと置き換えます。
-
これにより、当該スクリプトを読み込んでいる他のすべてのシーンが自動的にデフォルト値にリセットされます。
-
シーンを開いた状態で更新する場合は、手動で設定を変更する必要があります。
///
EN:
Damage show2.5.gd (22.3 KB)
How to Use
-
Create a Node2D, then add a Label node as its child
-
Attach the script to the Node2D
-
Copy and paste the script content into it
-
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:
-
Now damage text will pop up on taking hits even after scene switching, including when teleporting via portals or switching scenes through scene connections.
-
This also applies to objects pre-placed in the scene.
-
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
-
First, close all other object scenes that have already imported this script.
-
Copy the new script and replace the original one.
-
This will automatically reset all scenes that have loaded this script to their default values.
-
If the target scene is open during the update, you need to make the changes manually.