Project1
标题:
关于放上血条脚本后的问题
[打印本页]
作者:
S·MAX
时间:
2009-11-21 21:44
标题:
关于放上血条脚本后的问题
本帖最后由 S·MAX 于 2009-12-5 15:41 编辑
我把血条脚本放进游戏了
后经测试,发现使用技能后,状态的显示延迟了
不会立即显示,只会到敌人攻击后再显示出来,怎么解决?
问题.rar
2009-11-21 21:44 上传
点击文件名下载附件
190.03 KB, 下载次数: 147
作者:
S·MAX
时间:
2009-11-22 14:35
自顶
作者:
S·MAX
时间:
2009-11-23 22:29
很冷清啊...
作者:
S·MAX
时间:
2009-11-26 21:26
...
作者:
S·MAX
时间:
2009-11-29 18:19
作者:
S·MAX
时间:
2009-12-1 22:15
:(
作者:
S·MAX
时间:
2009-12-4 22:40
我在这里拜托各位了!!!~~~
我想在6R解散之前解决掉这个问题!!!!
作者:
淘金鸭
时间:
2009-12-4 23:15
他们懒得帮你解决
作者:
淘金鸭
时间:
2009-12-4 23:17
6R解散了也没人帮你回答
作者:
无心孤云
时间:
2009-12-5 00:56
我比较有兴趣6R为什么会解散。。。。。
作者:
奶油Da蛋糕
时间:
2009-12-5 07:09
楼主你好
作者:
Goldencolor
时间:
2009-12-5 08:19
= =b我比较有兴趣看你们谁x的最惨~
作者:
mmll0070
时间:
2009-12-5 09:33
就凭LZ你的这句话。我知道也不告诉你
作者:
霜冻之狼
时间:
2009-12-5 11:00
都快烂掉了你还问这个……
作者:
奶油Da蛋糕
时间:
2009-12-5 11:04
如果没有了,你会伤心么?
作者:
S·MAX
时间:
2009-12-5 12:52
挺伤心的..:(
作者:
S·MAX
时间:
2009-12-5 15:42
还以为这个很简单~~发贴2个星期 0 回复~ 我真天真...
作者:
淘金鸭
时间:
2009-12-5 21:45
其实6R已经解散了,所以没人帮你回答
作者:
夏季冰川
时间:
2009-12-7 11:26
反正我是不会,会的话肯定帮你。
作者:
darkten
时间:
2009-12-7 11:38
脚本我是不会改的了...
但是看起来是状态没有刷新...
从那个工程里的血条脚本看来,应该是以这个教程来修改的...
http://rpg.blue/web/htm/news518.htm
你要的话可以从新找一个没有修改过血条脚本然后修改...
祝你好运了...
PS:你的帖子撑超过2星期应该觉得欣慰,很多人的帖子在第二天就被过期掉了...
作者:
S·MAX
时间:
2009-12-13 10:57
+ +...自顶
作者:
上帝的眼睛
时间:
2009-12-13 14:22
我有兴趣回答lz的问题……
# ————————————————————————————————————
# 本脚本来自www.66rpg.com,转载请保留此信息
# ————————————————————————————————————
# ▼▲▼ XRXS_BP 7. バトルステータス?クリアデザイン ver.1.03 ▼▲▼
# by 桜雅 在土
#==============================================================================
# ■ Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :update_cp_only # CPメーターのみの更新
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias xrxs_bp7_initialize initialize
def initialize
# 初期化
@previous_hp = []
@previous_sp = []
# 呼び戻す
xrxs_bp7_initialize
# ↓Full-Viewの場合は下二行の # を消してください。
self.opacity = 160
self.back_opacity = 160
=begin
@hp = []
for j in 0...$game_party.actors.size
@hp[j] = $game_party.actors[j].hp
end
@refresh_flag = true
refresh
=end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_x = i * 160 + 4
draw_actor_name(actor, actor_x, 0)
draw_actor_hp(actor, actor_x, 32, 120)
draw_actor_sp(actor, actor_x, 64, 120)
if @level_up_flags[i]
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x, 96)
end
end
end
end
#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
def draw_battler_graphic(actor, x, y)
battler=RPG::Cache.battler(actor.battler_name, actor.battler_hue)
w = battler.width
h = battler.height
self.contents.blt(x-w/2, y-h, battler, Rect.new(0, 0, w,h),255)
self.z = 20
end
#★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
alias xrxs_bp7_refresh refresh
def refresh
# CPメーターの更新のみ の場合
if @update_cp_only
xrxs_bp7_refresh
return
end
# 変更するものがない場合、飛ばす
@item_max = $game_party.actors.size
bool = false
for i in 0...@item_max
actor = $game_party.actors[i]
if (@previous_hp[i] != actor.hp) or (@previous_sp[i] != actor.sp)
bool = true
end
end
return if bool == false
# 描写を開始
self.contents.clear
for i in 0...@item_max
actor = $game_party.actors[i]
actor_x = i * 160 + 21
# 歩行キャラグラフィックの描写
draw_battler_graphic(actor, actor_x + 43, 80)
# HP/SPメーターの描写
draw_actor_hp_meter_line(actor, actor_x - 17, 82, 120, 10)
draw_actor_sp_meter_line(actor, actor_x - 17, 98, 120, 10)
# HP数値の描写
self.contents.font.size = 18 # HP/SP数値の文字の大きさ
self.contents.font.color = Color.new(0,0,0,192)
self.contents.draw_text(actor_x, 72, 96, 24, actor.hp.to_s, 2)
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(actor_x-2, 70, 96, 24, actor.hp.to_s, 2)
# SP数値の描写
self.contents.font.color = Color.new(0,0,0,192)
self.contents.draw_text(actor_x, 88, 96, 24, actor.sp.to_s, 2)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(actor_x-2, 86, 96, 24, actor.sp.to_s, 2)
# 用語「HP」と用語「SP」の描写
self.contents.font.size = 18 # 用語「HP/SP」の文字の大きさ
self.contents.font.color = Color.new(0,0,0,192)
self.contents.draw_text(actor_x - 7, 74, 196, 24, $data_system.words.hp)
self.contents.draw_text(actor_x - 7, 90, 196, 24, $data_system.words.sp)
self.contents.font.color = system_color # 用語「HP/SP」の文字の色
self.contents.draw_text(actor_x - 7, 72, 196, 24, $data_system.words.hp)
self.contents.draw_text(actor_x - 7, 88, 196, 24, $data_system.words.sp)
# ステートの描写
draw_actor_state(actor, actor_x-20, 103) #X- 55
# 描画角色姓名
#draw_actor_name(actor, actor_x-17, 103)
# 値を更新
@previous_hp[i] = actor.hp
@previous_sp[i] = actor.sp
end
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● HPメーター の描画
#--------------------------------------------------------------------------
def draw_actor_hp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.hp / actor.maxhp
hp_color_1 = Color.new(255, 0, 0, 192)
hp_color_2 = Color.new(255, 255, 0, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ● SPメーター の描画
#--------------------------------------------------------------------------
def draw_actor_sp_meter_line(actor, x, y, width = 156, height = 4)
w = width * actor.sp / actor.maxsp
hp_color_1 = Color.new( 0, 0, 255, 192)
hp_color_2 = Color.new( 0, 255, 255, 192)
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
x -= 1
y += (height/4).floor
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).ceil , Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).ceil , hp_color_2)
x -= 1
y += (height/4).ceil
self.contents.fill_rect(x+8, y+4, width, (height/4).floor, Color.new(0, 0, 0, 128))
draw_line(x, y, x + w, y, hp_color_1, (height/4).floor, hp_color_2)
end
#--------------------------------------------------------------------------
# ● 名前の描画
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_name draw_actor_name
def draw_actor_name(actor, x, y)
xrxs_bp7_draw_actor_name(actor, x, y) #if @draw_ban != true
end
#--------------------------------------------------------------------------
# ● ステートの描画
#--------------------------------------------------------------------------
#alias xrxs_bp7_draw_actor_state draw_actor_state
#def draw_actor_state(actor, x, y, width = 120)
# xrxs_bp7_draw_actor_state(actor, x, y, width) if @draw_ban != true
#end
#--------------------------------------------------------------------------
# ● HP の描画
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_hp draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_hp(actor, x, y, width) if @draw_ban != true
end
#--------------------------------------------------------------------------
# ● SP の描画
#--------------------------------------------------------------------------
alias xrxs_bp7_draw_actor_sp draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
xrxs_bp7_draw_actor_sp(actor, x, y, width) if @draw_ban != true
end
end
#==============================================================================
# ■ Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias xrxs_bp7_update update
def update
xrxs_bp7_update
# メッセージウィンドウ表示中の場合
if $game_temp.message_window_showing
@status_window.update_cp_only = true
else
@status_window.update_cp_only = false
end
end
end
#==============================================================================
# ◇ 外部ライブラリ
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# ● ライン描画 軽量版 by 桜雅 在土
#--------------------------------------------------------------------------
def draw_lineght(start_x, start_y, end_x, end_y, start_color)
# 描写距離の計算。大きめに直角時の長さ。
distance = (start_x - end_x).abs + (start_y - end_y).abs
# 描写開始
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
self.contents.set_pixel(x, y, start_color)
end
end
#--------------------------------------------------------------------------
# ● ライン描画 by 桜雅 在土
#--------------------------------------------------------------------------
def draw_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color)
# 描写距離の計算。大きめに直角時の長さ。
distance = (start_x - end_x).abs + (start_y - end_y).abs
# 描写開始
if end_color == start_color
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
if width == 1
self.contents.set_pixel(x, y, start_color)
else
self.contents.fill_rect(x, y, width, width, start_color)
end
end
else
for i in 1..distance
x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i
y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i
r = start_color.red * (distance-i)/distance + end_color.red * i/distance
g = start_color.green * (distance-i)/distance + end_color.green * i/distance
b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance
a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance
if width == 1
self.contents.set_pixel(x, y, Color.new(r, g, b, a))
else
self.contents.fill_rect(x, y, width, width, Color.new(r, g, b, a))
end
end
end
end
end
class Scene_Battle
alias lv20_update update
def update
lv20_update
if $jiong_lv20
@status_window.refresh
$jiong_lv20 = false
end
end
end
class Interpreter
alias lv20_command_322 command_322
def command_322
$jiong_lv20 = true
return lv20_command_322
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1