Project1
标题:
如何更改战斗后显示的东西
[打印本页]
作者:
仙芋
时间:
2010-7-31 18:53
标题:
如何更改战斗后显示的东西
PAL1.png
(55.68 KB, 下载次数: 3)
下载附件
保存到相册
2010-7-31 18:52 上传
如图
如何弄到像仙剑一样?
作者:
bzzdhm
时间:
2010-8-1 07:56
改坐标和显示图片
作者:
moy
时间:
2010-8-1 08:10
得失物品脚本,自行寻找窗口皮肤素材并对脚本进行一定程度的修改...大部分是调整坐标什么的....
作者:
zhangbanxian
时间:
2010-8-1 08:23
本帖最后由 zhangbanxian 于 2010-8-1 08:24 编辑
Scene_Battle里的start_phase5找到
@result_window = Window_BattleResult.new(exp, gold, treasures)
复制代码
下面加
@result_window2 = Window_BattleResult.new(nil, gold, treasures)
复制代码
然后@result_window2.x =和@result_window2.y =调整坐标
然后update_phase5的
@result_window.visible = true
复制代码
下面加
@result_window2.visible = true
复制代码
main的
if @result_window != nil
@result_window.dispose
end
复制代码
下面加
if @result_window2 != nil
@result_window2.dispose
end
复制代码
然后Window_BattleResult的refresh改为
def refresh
self.contents.clear
if @exp != nil
x = 4
self.contents.font.color = normal_color
cx = contents.text_size(@exp.to_s).width
self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size("EXP").width
self.contents.draw_text(x, 0, 64, 32, "EXP")
else
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
x += cx + 4
self.contents.font.color = system_color
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += 32
end
end
end
end
复制代码
作者:
bbaugle
时间:
2010-8-1 11:53
章神仙。你可以弄成教程了。偶膜拜
作者:
仙芋
时间:
2010-8-1 12:15
可以是在图上写东西吗
用窗口皮肤做不到
作者:
退屈£无聊
时间:
2010-8-1 18:08
可以呀,用BITMAP呼出图片,把窗口改透明,或者直接做一个透明的窗口在脚本中调用,再一行行改就行了.
作者:
仙芋
时间:
2010-8-1 18:17
回复
退屈£无聊
的帖子
可以做个范例吗?
不太明白 @@
作者:
退屈£无聊
时间:
2010-8-1 18:24
手头没有RMXP……具体脚本告诉你好了
bitmap = Bitmap.new("") # 引号里是图片的地址,从Gra...(忘了)开始
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
self.contents.blt(0, 0, bitmap,src_rect)
再改self.contents.draw_text(x, 0, cx, 32, @exp.to_s)类似于这样的文本描写中
括号里前两个值……反正一遍遍测试就行了。
作者:
仙芋
时间:
2010-8-1 18:45
回复
退屈£无聊
的帖子
我的脚本:
#==============================================================================
# ■ Window_BattleResult
#------------------------------------------------------------------------------
# 战斗结束时、显示获得的 EXP 及金钱的窗口。
#==============================================================================
class Window_BattleResult < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# exp : EXP
# gold : 金钱
# treasures : 宝物
#--------------------------------------------------------------------------
def initialize(exp, gold, treasures)
@exp = exp
@gold = gold
@treasures = treasures
for actor in $game_party.actors
actor.hp += (actor.maxhp-actor.hp)*3/10
actor.sp += (actor.maxsp-actor.sp)*2/10
end
super(160, 0, 320, @treasures.size * 32 + 64)
self.windowskin = RPG::Cache.windowskin("skin2")
self.contents = Bitmap.new(width - 32, height - 32)
self.y = 160 - height / 2
self.back_opacity = 1000
self.visible = false
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
x = 4
self.contents.font.color = normal_color
cx = contents.text_size(@exp.to_s).width
self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size("经验").width
self.contents.draw_text(x, 0, 64, 32, "经验")
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
x += cx + 4
self.contents.font.color = system_color
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += 32
end
end
end
复制代码
刚才的应该加到哪里?
作者:
退屈£无聊
时间:
2010-8-1 20:37
本帖最后由 退屈£无聊 于 2010-8-1 20:40 编辑
回复
仙芋
的帖子
请在
def initialize(exp, gold, treasures)
下refresh前改掉这一句self.back_opacity = 0
若坏是不行自己看范例吧。
Project3.rar
(192.09 KB, 下载次数: 39)
2010-8-1 20:40 上传
点击文件名下载附件
作者:
退屈£无聊
时间:
2010-8-2 09:35
self.contents.draw_text(X坐标,Y坐标,宽,高,"获得")
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1