Project1
标题:
RPG Maker VX 怎样在地图上显示HP , MP ,和金钱
[打印本页]
作者:
falef
时间:
2011-1-24 03:07
标题:
RPG Maker VX 怎样在地图上显示HP , MP ,和金钱
本帖最后由 falef 于 2011-1-24 19:29 编辑
就是不需要按ESC就能看到HP , MP ,和金钱
谢谢fux2的回答,
但我是希望以血槽条的方式显示HP , MP
作者:
一瞬间的幻觉
时间:
2011-1-24 03:41
把变量1号和变量2号设定成主角的HP和MP
然后新建窗口,再地图上生成,刷新,释放并显示变量
具体怎么做挺复杂,应该是有专门的脚本
作者:
fux2
时间:
2011-1-24 09:36
回复
falef
的帖子
class Scene_Map
alias:fux2:main
def main
@info_fux2 = Fux2.new
fux2
@info_fux2.dispose
end
alias fux2update update
def update
@info_fux2.update
fux2update
end
end
class Fux2 < Window_Base
def initialize
super(20,20,300,132)
self.opacity = 0
self.back_opacity = 0
self.contents_opacity = 255
self.contents = Bitmap.new(244, 96)
@oldhp = nil
@oldmp = nil
@oldmoney = nil
end
def update
if @oldhp != $game_party.members[0].hp or @oldmp != $game_party.members[0].mp or @oldmoney != $game_party.gold
self.contents.clear
self.contents.draw_text(0,0,300,50,"生命:#{$game_party.members[0].hp}")
self.contents.draw_text(0,28,300,50,"魔法:#{$game_party.members[0].mp}")
self.contents.draw_text(0,56,300,50,"金币:#{$game_party.gold}")
@oldhp,@oldm, @oldmoney= $game_party.members[0].hp,$game_party.members[0].mp,$game_party.gold
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1