赞 | 0 |
VIP | 0 |
好人卡 | 1 |
积分 | 1 |
经验 | 8796 |
最后登录 | 2024-11-19 |
在线时间 | 330 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 85
- 在线时间
- 330 小时
- 注册时间
- 2010-5-4
- 帖子
- 173
|
3楼
楼主 |
发表于 2014-12-26 01:52:34
|
只看该作者
本帖最后由 亂堂和樹 于 2014-12-26 02:16 编辑
VIPArcher 发表于 2014-12-25 23:23
可以啊,6.times {|i| draw_item(0, line_height * (1 + i), 2 + i)}其实就是执行6次draw_item,每次i加1 ...
那這段又要怎麼改呢0.0"...因為新屬性用的 不是"param"..而是 "caram"...
#--------------------------------------------------------------------------
# ● 繪制更換裝備後的能力值
#--------------------------------------------------------------------------
def draw_new_param(x, y, param_id)
new_value = @temp_actor.param(param_id)
change_color(param_change_color(new_value - @actor.param(param_id)))
draw_text(x+19, y+77, 32, line_height, new_value, 1)
end
end
比如說最上的貼圖來說
格鬥 param
射擊 caram
防禦 param
技量 param
命中 param
迴避 param
這樣子,他只會單獨顯示第一個"格鬥"...後面的數值都沒
=============================================
更正,雖然數字都有出現,但是卻沒顏色.....(正常是...增加= 綠 , 減少 = 紅)
腳本方面...
def draw_new_param(x, y, param_id)
#new_value = @temp_actor.param(param_id)
#change_color(param_change_color(new_value - @actor.param(param_id)))
#draw_text(x+19, y+77, 32, line_height, new_value, 1)
if @actor == $game_actors[3]
new_value = @temp_actor.caram(1)
change_color(param_change_color(new_value - @actor.caram(1)))
draw_text(x+19, y+77, 40, line_height, new_value, 1)
elsif @actor == $game_actors[9]
new_value = @temp_actor.caram(1)
change_color(param_change_color(new_value - @actor.caram(1)))
draw_text(x+19, y+77, 40, line_height, new_value, 1)
else
new_value = @temp_actor.param(2)
new_value1 = @temp_actor.param(4)
change_color(param_change_color(new_value - @actor.param(2)))
change_color(param_change_color(new_value1 - @actor.param(4)))
draw_text(x+19, y+77, 40, line_height, new_value, 1)
draw_text(x+19, y+101, 40, line_height, new_value1, 1)
end
new_value2 = @temp_actor.param(5)
new_value3 = @temp_actor.param(3)
new_value4 = @temp_actor.param(7)
new_value5 = @temp_actor.param(6)
change_color(param_change_color(new_value2 - @actor.param(5)))
change_color(param_change_color(new_value3 - @actor.param(3)))
change_color(param_change_color(new_value4 - @actor.param(7)))
change_color(param_change_color(new_value5 - @actor.param(6)))
draw_text(x+19, y+125, 40, line_height, new_value2, 1)
draw_text(x+19, y+149, 40, line_height, new_value3, 1)
draw_text(x+19, y+173, 40, line_height, new_value4, 1)
draw_text(x+19, y+197, 40, line_height, new_value5, 1)
end
end |
|