Project1
标题:
求一个脚本
[打印本页]
作者:
星语心の梦
时间:
2008-8-16 20:31
提示:
作者被禁止或删除 内容自动屏蔽
作者:
★_茄孓
时间:
2008-8-16 20:58
class Window_BattleStatus < Window_Base
def draw_actor_hp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x-50, y, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x-35, y, 48, 32, "/", 2)
self.contents.draw_text(hp_x, y, 48, 32, actor.maxhp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
def draw_actor_sp(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x-50, y, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x-35, y, 48, 32, "/", 2)
self.contents.draw_text(sp_x, y, 48, 32, actor.maxsp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end
end
复制代码
放main前即可生效 [LINE]1,#dddddd[/LINE]
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
作者:
IamI
时间:
2008-8-16 21:05
ORZ这是在干什么
RGSS已经内置了这个功能
BattleStatus,找到
draw_actor_hp(actor, actor_x, 32, 120)
最后一个数字直接改140,sp也一样
作者:
冰城飞狐
时间:
2008-8-16 21:19
SS党的……
汗……
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1