Project1
标题:
怎么做图片血条和魔条(全局)?
[打印本页]
作者:
冰舞蝶恋
时间:
2010-11-6 19:35
标题:
怎么做图片血条和魔条(全局)?
想知道能不能把角色状态(血、魔、名字)啥的去掉,直接放在角色行走图下面~~用的是约束横版。。
作者:
Rion幻音
时间:
2010-11-7 10:10
这是图片显示血……(魔的话更改脚本中的hp为mp就可以了,坐标之类的自己写吧~不会的话直接放范例给你,要等一段时间~)
(, 下载次数: 80)
上传
点击文件名下载附件
(, 下载次数: 84)
上传
点击文件名下载附件
(, 下载次数: 74)
上传
点击文件名下载附件
def draw_actor_hp(actor, x, y)
back = Cache.system("Meter_Back")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = Cache.system("HP_Meter")
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
text = Cache.system("HP_Text")
cw = text.width
ch = text.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 35, y - ch + 30, text, src_rect)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)
end
复制代码
作者:
冰舞蝶恋
时间:
2010-11-7 10:14
本帖最后由 冰舞蝶恋 于 2010-11-7 10:20 编辑
回复
Rion幻音
的帖子
谢谢幻哥~~还是放个范例吧,毕竟咱比较懒0.0
作者:
Rion幻音
时间:
2010-11-7 10:21
回复
冰舞蝶恋
的帖子
是哥……!
范例的话等我一会吧~
作者:
冰舞蝶恋
时间:
2010-11-7 10:26
回复
Rion幻音
的帖子
好的~~谢谢喽
作者:
Rion幻音
时间:
2010-11-7 11:36
本帖最后由 Rion幻音 于 2010-11-7 11:41 编辑
回复
冰舞蝶恋
的帖子
LZ……我已经尽力了……无法完成啊~
魔力方面的话……
(, 下载次数: 91)
上传
点击文件名下载附件
(, 下载次数: 93)
上传
点击文件名下载附件
def draw_actor_mp(actor, x, y)
back = Cache.system("Meter_Back")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = Cache.system("MP_Meter")
cw = meter.width * actor.mp / actor.maxmp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
text = Cache.system("MP_Text")
cw = text.width
ch = text.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 35, y - ch + 30, text, src_rect)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 81, y - 1, 48, 32, actor.mp.to_s, 2)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 80, y - 2, 48, 32, actor.mp.to_s, 2)
end
作者:
冰舞蝶恋
时间:
2010-11-7 12:42
回复
Rion幻音
的帖子
谢谢,测试中
作者:
冰舞蝶恋
时间:
2010-11-7 12:46
回复
Rion幻音
的帖子
战斗的话角色状态栏会出错呐~~
作者:
捣蛋
时间:
2010-11-7 13:51
楼主就不要数值的血条了?就直接用血条表示?
看不到血的数值?就只有一条血条在角色下面?
作者:
冰舞蝶恋
时间:
2010-11-7 14:23
回复
捣蛋
的帖子
要数值。。另外为何幻兄的一战斗就会出错
作者:
Rion幻音
时间:
2010-11-7 18:56
class Window_Base
def draw_actor_hp(actor, x, y)
back = Cache.system("Meter_Back")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = Cache.system("HP_Meter")
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
text = Cache.system("HP_Text")
cw = text.width
ch = text.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 35, y - ch + 30, text, src_rect)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)
end
def draw_actor_mp(actor, x, y)
back = Cache.system("Meter_Back")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)
meter = Cache.system("MP_Meter")
cw = meter.width * actor.mp / actor.maxmp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
text = Cache.system("MP_Text")
cw = text.width
ch = text.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 35, y - ch + 30, text, src_rect)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 81, y - 1, 48, 32, actor.mp.to_s, 2)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 80, y - 2, 48, 32, actor.mp.to_s, 2)
end
end
复制代码
写的不完整……望见谅……
作者:
冰舞蝶恋
时间:
2010-11-7 19:12
回复
Rion幻音
的帖子
一战斗battlestatus就出错
(, 下载次数: 68)
上传
点击文件名下载附件
作者:
Rion幻音
时间:
2010-11-7 22:48
回复
冰舞蝶恋
的帖子
rect.y 后的全部删掉……
作者:
冰舞蝶恋
时间:
2010-11-8 12:50
回复
Rion幻音
的帖子
怎么删?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X5.0