查看: 1512|回复: 2

[有事请教] popname插件事件没出现但是头上还会显示文字

[复制链接]
梦石
0
星屑
2197
在线时间
225 小时
注册时间
2018-4-23
回帖
83
发表于 2023-6-29 13:16:17 | 显示全部楼层 |阅读模式
悬赏20星屑未解决
本帖最后由 pajiman1999 于 2023-6-29 13:19 编辑

popname插件事件没出现但是头上还会显示文字  如何修改呀?

代码如下

(function() {
        _Sprite_Character_prototype_initialize = Sprite_Character.prototype.initialize;
        Sprite_Character.prototype.initialize = function(character) {
                _Sprite_Character_prototype_initialize.call(this, character);
                this._tempCharacter = character;
                if (character instanceof Game_Event) {
                        if (character.event().note.match("NAMEPOP") != null) {
                                var notetext = character.event().note.split("|");
                                this._namepopY = Number(notetext[1]) || 1;
                                this._fontSize = Number(notetext[2]) || 18;
                                this.createNamepopSet();
                        }
                }
        };

        Sprite_Character.prototype.createNamepopSet = function() {
                var h = this._fontSize;
                this._namepopSprite = new Sprite();
                this._namepopSprite.bitmap = new Bitmap(h * 10, h);
                this._namepopSprite.bitmap.fontSize = h;
                this._namepopSprite.bitmap.drawText(this._tempCharacter.event().name, 0, 0, h * 10, h, 'center');
                this._namepopSprite.anchor.x = 0.5;
                this._namepopSprite.anchor.y = 1;
                this._namepopSprite.y = this.y - this._namepopY * 48;
                this.addChild(this._namepopSprite);
        };
}());

事件备注 NAMEPOP|1|26|rgba(255,255,255,1)  然后NPC在某些情况下如果不出现的话,但头顶还会出现字……

梦石
0
星屑
7089
在线时间
722 小时
注册时间
2021-3-5
回帖
731
发表于 2023-6-30 22:15:11 | 显示全部楼层
不用修改,直接删掉,然后换钻头群主的漂浮文字插件即可
回复

使用道具 举报

梦石
0
星屑
34
在线时间
7 小时
注册时间
2025-2-21
回帖
3
发表于 2025-2-21 13:26:56 | 显示全部楼层
大佬,你之前测试的那个队首固定插件MV也可以用?请问是如何设置的呀 我设置后没效果
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部