作者bill (太极狂龙)
看板RPGMaker
标题Re: [问题] 如何多设素质?
时间Thu Aug 6 01:46:41 2009
※ 引述《imsorry78 (传说中的大神)》之铭言:
: 我想要多设两个素质~把妹用的XD
: 一种是体力 一种是魅力~
: 体力是跟血量一样~可以吃东西补回来的~
: 另外一种是魅力~想说多设一个魅力~
: 我知道这用变数可以做,但是这样玩的人就不知道从哪里看到自己的魅力~
: 也不知道怎麽看体力~
假设四名队员的体力值分别存放於变数0001~0004
体力最大值存於变数0005~0008
魅力值存於变数0009~0012
列出体力值於队伍选单HP值的上方
Window_MenuStatus >> refresh方法,在
draw_actor_sp(actor, x + 236, y + 64)後加上
draw_actor_vp($game_variables[i+1], $game_variables[i+5], x + 236, y)
Window_Base >> 於程式末尾的end前加上
def draw_actor_vp(vp, maxvp, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "VP")
if width - 32 >= 108
vp_x = x + width - 108
flag = true
elsif width - 32 >= 48
vp_x = x + width - 48
flag = false
end
self.contents.font.color = vp == 0 ? knockout_color :
vp <= maxvp / 4 ? crisis_color : normal_color
self.contents.draw_text(vp_x, y, 48, 32, vp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(vp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(vp_x + 60, y, 48, 32, maxvp.to_s)
end
end
列出魅力值於个人状态栏HP值的右方
Window_Status >> refresh方法,於
draw_actor_parameter(@actor, 96, 400, 6)後加上
draw_actor_charisma($game_variables[@actor.index + 9], 320, 112)
Window_Base >> 於程式末尾的end前加上
def draw_actor_charisma(cha, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, "魅力")
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, cha.to_s, 2)
end
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.124.100.204
1F:推 CBH:bill大出手 就知有没有 推一个 08/06 13:09
2F:推 imsorry78:老大!!!太感恩你了~~快来做一个~ 08/06 15:20
3F:→ imsorry78:先赠三百P给你~~感恩感恩!! 08/06 15:20