赞 | 1 |
VIP | 2 |
好人卡 | 3 |
积分 | 1 |
经验 | 3670 |
最后登录 | 2012-9-3 |
在线时间 | 151 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 151 小时
- 注册时间
- 2012-3-17
- 帖子
- 493
|
本帖最后由 iisnow 于 2012-3-21 19:37 编辑
在論壇里現在了別人的範例血條腳本 在執行的時候發現了問題
遊戲的時候不顯示血條 如圖
可是當我打開上面的箱子按ESC的時候竟然能觸發腳本的血條而顯示 如圖
這個是怎麼回事?
‘‘──skyjjwan于2012-3-21 08:01补充以下内容
補充一下 只要打開箱子就能把血條弄出來
這個是那位大大的腳本- class Scene_Map < Scene_Base
- alias hpmpwindow_start start
-
-
- def start
- hpmpwindow_start
- @hpmpwindow = Window_Base.new(0, 336, 544, 80)
-
-
- if $game_switches[1] == true
- @hpmpwindow.opacity = 255
- @hpmpwindow.back_opacity = 200
- @hpmpwindow.contents_opacity = 255
- else
- @hpmpwindow.opacity = 0
- @hpmpwindow.back_opacity = 0
- @hpmpwindow.contents_opacity = 0
- end
- @temp_hp =[0,0,0,0]
- @temp_mp =[0,0,0,0]
- end
- alias hpmpwindow_update update
- def update
-
- t_flag=0
-
- for i in 0..($game_party.members.size <= 4 ? $game_party.members.size-1: 3)
- actor = $game_party.members[i]
- if @temp_hp[i] != actor.hp or @temp_mp[i] != actor.mp
-
- t_flag = t_flag + 1
-
- @temp_hp[i] = actor.hp
- @temp_mp[i] = actor.mp
- end
-
- end
-
- if t_flag >0 #某人hp增减了
- @hpmpwindow.contents.clear #清空循环重画所有人的血条
-
- for i in 0..($game_party.members.size <= 4 ? $game_party.members.size-1: 3)
- actor = $game_party.members[i]
-
- @hpmpwindow.draw_actor_hp(actor, i*136, 0 , width = 100)
- @hpmpwindow.draw_actor_mp(actor, i*136, 24, width = 100)
- @hpmpwindow.draw_actor_graphic(actor, i*136+40, 40)
-
- end
-
- t_flag = 0
-
- end
-
- @hpmpwindow.update
- hpmpwindow_update
- if $game_switches[1] == true
- @hpmpwindow.opacity = 255
- @hpmpwindow.back_opacity = 200
- @hpmpwindow.contents_opacity = 255
- else
- @hpmpwindow.opacity = 0
- @hpmpwindow.back_opacity = 0
- @hpmpwindow.contents_opacity = 0
- end
- end
- alias hpmpwindow_terminate terminate
- def terminate
- @hpmpwindow.dispose
- hpmpwindow_terminate
- end
- end
复制代码 ’’ |
|