じ☆ve冰风 发表于 前天 20:30

VE - Target Arrow

For those of you with this error:

Script ‘Window_Base’ line 408: NoMethodError occurred. undefined method ‘hp’ for nil:NilClass.

If you don't want to sacrifice the enemy name, color, and states display by switching the help window off, I fixed mine by finding this method in window help (in the target arrow script):



                Code:       
def set_target_text(target, align = 0)

Find this:



                Code:       
if target != @target || @target.name != @text
          @text   = ""
          @target = target
          @align= align
          target_info
        end

Change that to this:



                Code:       
if target != nil
        if target != @target || @target.name != @text
          @text   = ""
          @target = target
          @align= align
          target_info
        end
end

It basically makes sure that if the target is nil, it won't put an arrow over him. I have not run into any problems with this yet. Hope that helps!

I also posted it on his blog.


本贴来自国际rpgmaker官方论坛作者:Yin处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/ve-target-arrow.457/
页: [1]
查看完整版本: VE - Target Arrow