赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 0 |
经验 | 0 |
最后登录 | 2010-10-23 |
在线时间 | 0 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 444
- 在线时间
- 0 小时
- 注册时间
- 2010-10-8
- 帖子
- 3
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 minivivi 于 2010-10-15 16:20 编辑
主要是希望能够知道如何能在非战斗地图关闭HP等窗口的方法
如上图这样
HP跟SP条常驻在画面上
想做开头画面,也会因为HP条跟SP的显示
看起来怪怪的
在发问前,已经爬了不少文
也搜索了相关字汇
像是這篇脚本高手请入……讨厌的BUG
请问怎么让HP显示可以选择
所以知道应该是跟
def hud_properties
if (CrissaegrimHud::OnOff_Hud_Switch == 0 or $game_switches[CrissaegrimHud::OnOff_Hud_Switch] == true)
if @hud.visible == false
@hud.update
@hud.visible = true
@bg.visible = true
end
elsif @hud.visible != false
@hud.visible = false
@bg.visible = false
end
end
这边有关
但是我在地图上试着设定事件
事件指令中的脚本内
我不管是输入
$game_switches[CrissaegrimHud::OnOff_Hud_Switch] == false
还是
$game_switches[0] == true
或是
OnOff_Hud_Switch = 1
都不起作用或是错误
看到有人提到是用变量操作
不知道详细的方法到底是如何?
希望各位高手能够帮我QQ
感激不尽
下面是我用的脚本- #==============================================================================
- # Window Hud
- #这个脚本是经过yangff修改后的改良版,大量的增加了刷新效率,用这个体院原版hud基本何以满帧了
- #==============================================================================
- module CrissaegrimHud
-
- # imagem de fundo da hud
- Background = "HUD_Background"
- # Switch que ativa / desativa a HUD
- # se for = 0, a Hud será mostrada na tela permanentemente
- OnOff_Hud_Switch = 0
- end
- #------------------------------------------------------------------------------
- class Window_CrissaegrimHud < Window_Base
- def initialize
- super(0,0,700,700)
- self.opacity = 0
- update
- end
-
- def update
- return if Crissaegrim_ABS::Distance_Weapons == nil
- if (@hp != $game_party.members[0].hp or @mp != $game_party.members[0].mp) or $refreshon==1#(tp1 != @tp1 or tp2 != @tp2)
- #上一行是刷新条件
- @hp = $game_party.members[0].hp
- @mp = $game_party.members[0].mp
- $refreshon = 0
- self.contents.font.size = 16
- self.contents.clear
- skill_count = 0
- for button in Crissaegrim_ABS::Skill_Button.keys
- next if button == nil
- skill = $data_skills[Crissaegrim_ABS::Skill_Button[button]]
- next if skill == nil
- show_icon(skill, (28 * skill_count) + 358, 316)
- skill_count += 1
- end
- item_count = 0
- for btn in Crissaegrim_ABS::Item_Button.keys
- next if btn == nil
- item = $data_items[Crissaegrim_ABS::Item_Button[btn]]
- next if item == nil
- show_icon(item, (28 * item_count) + 358, 356)
- item_count += 1
- end
- actor = $game_party.members[0]
- draw_actor_hp(actor, 0, -4, 96)
- draw_actor_mp(actor, 0, 20, 96)
- draw_actor_level(actor, 0, 44)
- show_state(actor, 115, 0)
- if Crissaegrim_ABS::Distance_Weapons.has_key?($game_party.members[0].weapon_id)
- if Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5].to_i > 0
- show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5]], 260, 0)
- self.contents.font.size = 18
- self.contents.font.color = text_color(15)
- self.contents.draw_text(260, 8, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5]]),1)
- self.contents.font.size = 16
- self.contents.font.color = text_color(0)
- self.contents.draw_text(260, 8, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][5]]),1)
- end
- if Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6].to_i > 0
- show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6]], 260, 40)
- self.contents.font.size = 18
- self.contents.font.color = text_color(15)
- self.contents.draw_text(260, 48, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6]]),1)
- self.contents.font.size = 16
- self.contents.font.color = text_color(0)
- self.contents.draw_text(260, 48, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[$game_party.members[0].weapon_id][6]]),1)
- end
- end
- end
- end
- def show_state(actor, x, y)
- count = 0
- for state in actor.states
- draw_icon(state.icon_index, x, y + 24 * count)
- count += 1
- break if (24 * count > 76)
- end
- end
- def show_icon(item, x, y)
- if item != nil
- draw_icon(item.icon_index, x, y)
- end
- end
- end
- class Scene_Map
- alias hud_start start
- alias hud_update update
- alias hud_terminate terminate
- def start
- super
- @bg = Sprite.new
- @bg.bitmap = Cache.system(CrissaegrimHud::Background)
- @bg.x = 200
- @bg.y = 316
- @hud = Window_CrissaegrimHud.new
- @hud.x = 0
- @hud.y = 0
- hud_properties
- hud_start
- end
- def update
- super
- #@bg.update
- if @hud.visible != false
- @hud.update
- end
- hud_properties
- hud_update
- end
- #--------------------------------------------------------------------------
- # ● 与状态窗口的开关相关的语句
- #--------------------------------------------------------------------------
- def hud_properties
- if (CrissaegrimHud::OnOff_Hud_Switch == 0 or $game_switches[CrissaegrimHud::OnOff_Hud_Switch] == true)
- if @hud.visible == false
- @hud.update
- @hud.visible = true
- @bg.visible = true
- end
- elsif @hud.visible != false
- @hud.visible = false
- @bg.visible = false
- end
- end
- def terminate
- super
- @bg.dispose
- @bg = nil
- @hud.dispose
- @hud = nil
- hud_terminate
- end
- end
复制代码 |
|