ГлавнаяФорумRPG MakerСкрипты/ПлагиныRPG Maker VX ACEВопросы по скриптам ACEFalcao Pearl ABS Liquid V3. Скрыть HUD.
Войти на сайт
×
ТЕМА: Falcao Pearl ABS Liquid V3. Скрыть HUD.
Falcao Pearl ABS Liquid V3. Скрыть HUD. 9 года 7 мес. назад #80825
|
Есть боёвка Falcao Pearl ABS Liquid V3. Там встроенными идут HUD жизней и маны и HUD панели навыков(Скрипты Pearl Life Bars и Pearl Skillbar соответственно). Стандартно они оба отображаются. Скрыть их можно командами PearlBars.hide и PearlSkillBar.hide через событие. Но что нужно изменить в скрипте, чтобы при начале игры они были скрыты?
- Pearl Life Bars: ВНИМАНИЕ: Спойлер! [ Нажмите, чтобы развернуть ][ Нажмите, чтобы скрыть ] #===============================================================================
# * Falcao Pearl ABS script shelf # 7
#
# Actor / Eenemies HP and MP bars display v 2.0
#
# This script acts like an Add-On, the main system can run without this piece
#
#-------------------------------------------------------------------------------
# * Features
# - Display HP, MP, experience and TP bars of the current player actor
# - Display the Enemy HP bar when was hit
# - Boss HP bar anabled
# - Display enemy states and buff / debuff icons
# - Non-graphical bars but hightly customizable
# - 2.0 now support images instead of script drawing bars
# * Usage and Installation
# Just copy and paste below the Pearl ABS System
#
# * Commands
# PearlBars.hide - Hide the actor bars
# PearlBars.show - Show the actor bars (by default)
#
# PearlBars.enemy_auto(id)- Show automatically the enemy HP bars without need
# to hit, this is mostly used for bosses, change id for the event id
# Tag any enemy with Enemy Boss Bar = true to eneble the boss bar mode
#------------------------------------------------------------------------------
module PearlBars
#=============================================================================
# * Actors bars configuration
#
# Bars x and y position on the screen
ScreenPos_X = 10
ScreenPos_Y = 10
#
# Dimentions of the bars you cant exceed 300 width x 100 height
# x y width height
HP_BarDimentions = [8, 16, 118, 14]
MP_BarDimentions = [8, 36, 118, 14]
EX_BarDimentions = [8, 57, 118, 10]
# Tp info x y
TP_Info = [8, 64]
#
# color definition
# color 1 R G B Opa color 2 R G B Opa
HP_Color = [Color.new(205, 255, 205, 200), Color.new(10, 220, 45, 200)]
MP_Color = [Color.new(180, 225, 245, 200), Color.new(20, 160, 225, 200)]
EX_Color = [Color.new(180, 225, 245, 200), Color.new(20, 160, 225, 200)]
# Do you want to display graphics instead of script drawing bars?
# if so, fill this actors bars graphics requirements
ActorsHp = "" # Actor Hp graphic bar name (inside quotation marks)
ActorsMp = "" # Actor Mp graphic bar name
ActorsExp = "" # Actor Experience, if you dont want it leave it ""
ActorsBack = "" # Background semi-transparent bar
#=============================================================================
# * Normal Enemies bars
#
# Normal enemies Bars x and y position on the screen
NeScreenPos_X = 390
NeScreenPos_Y = 10
#
# Dimentions of the bars you cant exceed 300 width x 100 height
# x y width height
EHP_BarDimentions = [8, 16, 126, 10]
#
# color definition
# color 1 R G B Opa color 2 R G B Opa
EHP_Color = [Color.new(205, 255, 205, 200), Color.new(10, 220, 45, 200)]
# if you want to display grahics bar pictures fill this
NormalEne = "" # normal enemy hp bar
NormalBack = "" # Background semi-transparent bar
#=============================================================================
# * Enemy Boss HP Bar
#
# Boss enemies Bar x and y position on the screen
BeScreenPos_X = 100
BeScreenPos_Y = 286
#
# Dimentions of the bars you cant exceed 640 width x 100 height
# x y width height
BHP_BarDimentions = [8, 22, 330, 12]
#
# color 1 R G B Opa color 2 R G B Opa
BHP_Color = [Color.new(205, 255, 205, 200), Color.new(10, 220, 45, 200)]
# if you want to display grahics bar pictures fill this
BossEne = "" # Boss enemy Hp bar
BossBack = "" # Background semi-transparent bar
#=============================================================================
def self.show() $game_system.pearlbars = nil end
def self.hide() $game_system.pearlbars = true end
def self.enemy_auto(event_id)
$game_system.enemy_lifeobject = $game_map.events[event_id]
end
end
($imported ||= {})["Falcao Pearl ABS Life"] = true
class Spriteset_Map
alias falcaopearl_lifebars_create create_pictures
def create_pictures
create_hud_lifebars
falcaopearl_lifebars_create
end
def create_hud_lifebars
@enemy_lifeobject = $game_system.enemy_lifeobject
@enemyhpsp = Sprite_LifeBars.new(@viewport2, @enemy_lifeobject) if
not @enemy_lifeobject.nil?
end
def create_actorlifebars
return if !@actor_lifebar.nil?
@actor_lifebar = Sprite_LifeBars.new(@viewport2, $game_player)
end
def dispose_actorlifebars
return if @actor_lifebar.nil?
@actor_lifebar.dispose
@actor_lifebar = nil
end
alias falcaopearl_lifebars_update update
def update
update_lifebars_sprites
falcaopearl_lifebars_update
end
def update_lifebars_sprites
$game_system.pearlbars.nil? ? create_actorlifebars : dispose_actorlifebars
@actor_lifebar.update unless @actor_lifebar.nil?
# enemy
if !@enemyhpsp.nil?
unless @enemyhpsp.disposed?
@enemyhpsp.update
else
@enemyhpsp.dispose
@enemyhpsp = nil
$game_system.enemy_lifeobject = nil
@enemy_lifeobject = nil
end
end
if @enemy_lifeobject != $game_system.enemy_lifeobject
@enemyhpsp.dispose if !@enemyhpsp.nil?
@enemyhpsp = nil
@enemyhpsp = Sprite_LifeBars.new(@viewport2,$game_system.enemy_lifeobject)
@enemy_lifeobject = $game_system.enemy_lifeobject
end
end
alias falcaopearl_lifebars_dispose dispose
def dispose
dispose_actorlifebars
@enemyhpsp.dispose unless @enemyhpsp.nil?
falcaopearl_lifebars_dispose
end
end
# Life bars sprite
class Sprite_LifeBars < Sprite
include PearlBars
def initialize(viewport, character)
super(viewport)
@character = character
self.bitmap = Bitmap.new(boss? ? 640 : 300, 120)
@old_hp = battler.hp
@old_mp = battler.mp
@erasetimer = 180
@state_checker = []
@buff_checker = []
refresh_contents
@view = viewport
update
end
def boss?
return true if battler.is_a?(Game_Enemy) && battler.boss_hud
return false
end
def battler
return @character.battler
end
def refresh_contents
self.bitmap.clear
self.bitmap.font.size = 19
@erasetimer = 180
self.opacity = 255
if battler.is_a?(Game_Actor)
@old_exp = battler.exp
@old_tp = battler.tp
self.x = ScreenPos_X
self.y = ScreenPos_Y
h = HP_BarDimentions ; m = MP_BarDimentions ; e = EX_BarDimentions
if PearlBars::ActorsHp != ""
@pimg = Cache.picture(PearlBars::ActorsHp) if @pimg.nil?
@bimg = Cache.picture(PearlBars::ActorsBack) if @bimg.nil?
@pimp = Cache.picture(PearlBars::ActorsMp) if @pimp.nil?
PearlKernel.image_hp(self.bitmap, h[0] + 4, h[1],@bimg,
@pimg, battler,true)
PearlKernel.image_mp(self.bitmap, m[0] + 4, m[1], @bimg, @pimp, battler)
if PearlBars::ActorsExp != ""
@piexp = Cache.picture(PearlBars::ActorsExp) if @piexp.nil?
PearlKernel.image_exp(self.bitmap,e[0] + 4,e[1],@bimg,@piexp, battler)
end
else
hc = HP_Color ; mc = MP_Color ; ec = EX_Color
PearlKernel.draw_hp(self.bitmap,battler, h[0], h[1], h[2], h[3], hc)
PearlKernel.draw_mp(self.bitmap,battler, m[0], m[1], m[2], m[3], mc)
PearlKernel.draw_exp(self.bitmap,battler, e[0], e[1], e[2], e[3], ec)
end
PearlKernel.draw_tp(self.bitmap, TP_Info[0], TP_Info[1], battler)
else battler.is_a?(Game_Enemy)
if boss?
self.x = BeScreenPos_X
self.y = BeScreenPos_Y
h = BHP_BarDimentions ; hc = BHP_Color
if PearlBars::BossEne != ""
@n_img = Cache.picture(PearlBars::BossEne) if @n_img.nil?
@n_back = Cache.picture(PearlBars::BossBack) if @n_back.nil?
PearlKernel.image_hp(self.bitmap, h[0] + 4, h[1],@n_back,
@n_img, battler,true)
else
PearlKernel.draw_hp(self.bitmap,battler, h[0],h[1],h[2], h[3],hc,true)
end
else
self.x = NeScreenPos_X
self.y = NeScreenPos_Y
h = EHP_BarDimentions ; hc = EHP_Color
if PearlBars::NormalEne != ""
@n_img = Cache.picture(PearlBars::NormalEne) if @n_img.nil?
@n_back = Cache.picture(PearlBars::NormalBack) if @n_back.nil?
PearlKernel.image_hp(self.bitmap, h[0] + 4, h[1],@n_back,
@n_img, battler,true)
else
PearlKernel.draw_hp(self.bitmap,battler,h[0],h[1],h[2], h[3], hc,true)
end
end
end
end
def update
super
if battler.nil?
dispose
return
end
if @old_hp != battler.hp
refresh_contents
@old_hp = battler.hp
end
if @old_mp != battler.mp
refresh_contents
@character.actor.apply_usability if @character.is_a?(Game_Player)
@old_mp = battler.mp
end
if battler.is_a?(Game_Actor)
if @old_exp != battler.exp
@old_exp = battler.exp
refresh_contents
end
if @old_tp != battler.tp
@old_tp = battler.tp
@character.actor.apply_usability if @character.is_a?(Game_Player)
refresh_contents
end
elsif battler.is_a?(Game_Enemy)
if boss?
dispose if battler.dead?
else
if @erasetimer > 0
@erasetimer -= 1
self.opacity -= 10 if @erasetimer <= 25
@states.opacity = self.opacity if !@states.nil?
dispose if @erasetimer == 0
end
end
update_enemy_status_icons
end
end
# enemy status icons engine
def update_enemy_status_icons
display_status? ? create_states_icons : dispose_state_icons
4.times.each {|i| refresh_states_icons if
@state_checker[i] != battler.state_icons[i]}
2.times.each {|i| refresh_states_icons if
@buff_checker[i] != battler.buff_icons[i]}
end
def display_status?
return true if !battler.state_icons.empty?
return true if !battler.buff_icons.empty?
return false
end
def create_states_icons
return if disposed?
return if !@states.nil?
@states = ::Sprite.new(@view)
@states.bitmap = Bitmap.new(144, 24)
@n_back.nil? ? y_plus = BHP_BarDimentions[3] : y_plus = @n_back.height
pos = [BeScreenPos_X, BeScreenPos_Y, y_plus] if boss?
pos = [NeScreenPos_X, NeScreenPos_Y, y_plus] if !boss?
@states.x = pos[0] + 10
@states.y = pos[1] + pos[2] + 24
@states.zoom_x = 0.8
@states.zoom_y = 0.8
refresh_states_icons
end
def dispose_state_icons
return if @states.nil?
@states.bitmap.dispose
@states.dispose
@states = nil
end
def refresh_states_icons
4.times.each {|i| @state_checker[i] = battler.state_icons[i]}
2.times.each {|i| @buff_checker[i] = battler.buff_icons[i]}
return if @states.nil?
@states.bitmap.clear
x = 0
battler.state_icons.each {|icon| draw_icon(icon, x, 0) ; x += 24
break if x == 96}
count = 0
battler.buff_icons.each {|icon| draw_icon(icon, x, 0) ; x += 24 ; count += 1
break if count == 2}
end
def draw_icon(icon_index, x, y, enabled = true)
bit = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
@states.bitmap.blt(x, y, bit, rect, enabled ? 255 : 150)
end
def dispose
self.bitmap.dispose
dispose_state_icons
super
end
end
# Make the enemy bars to load when enemy is hited
class Projectile < Game_Character
alias falcao_lifebars_execute execute_damageto_enemy
def execute_damageto_enemy(event)
$game_system.enemy_lifeobject = event if @user.is_a?(Game_Player) &&
!event.battler.object
falcao_lifebars_execute(event)
end
end - Pearl Skillbar: ВНИМАНИЕ: Спойлер! [ Нажмите, чтобы развернуть ][ Нажмите, чтобы скрыть ] #===============================================================================
# * Falcao Pearl ABS script shelf # 4
#
# This script handles the Skillbar funtions
# it is designed to support the 'Mouse System Buttons script 1.6 and above too
# you can trigger tools by clicking the icons on the toolbar!
#===============================================================================
module PearlSkillBar
# Skillbar X position in tiles
Tile_X = 5.5
# Skillbar Y position in tiles
Tile_Y = 13
# Layout graphic
LayOutImage = "Pearl Skillbar"
# Follower attack command icon index
ToggleIcon = 116
# * Commands
#
# PearlSkillBar.hide - hide the skillbar
# PearlSkillBar.show - show the skillbar
#-----------------------------------------------------------------------------
def self.hide
$game_system.skillbar_enable = true
end
def self.show
$game_system.skillbar_enable = nil
end
def self.hidden?
!$game_system.skillbar_enable.nil?
end
end
class Game_System
attr_accessor :skillbar_enable, :pearlbars, :enemy_lifeobject
alias falcaopearl_abs_hud initialize
def initialize
unless PearlKernel::StartWithHud
@skillbar_enable = true
@pearlbars = true
end
falcaopearl_abs_hud
end
end
class Sprite_PearlTool < Sprite
include PearlSkillBar
attr_accessor :actor
def initialize(view, custom_pos=nil)
super(view)
@layout = ::Sprite.new(view)
@layout.bitmap = Cache.picture(LayOutImage)
@icons = ::Sprite.new(view)
@icons.bitmap = Bitmap.new(@layout.bitmap.width, @layout.bitmap.height)
self.bitmap = Bitmap.new(@layout.bitmap.width+32, @layout.bitmap.height+32)
if custom_pos.nil?
@layout.x = Tile_X * 32
@layout.y = Tile_Y * 32
else
@layout.x = custom_pos[0]
@layout.y = custom_pos[1]
end
@icons.x = @layout.x
@icons.y = @layout.y
self.x = @layout.x - 16
self.y = @layout.y - 12
self.z = self.z + 1
@actor = $game_player.actor
@actor.apply_usability
@old_usability = []
8.times.each {|i| @old_usability[i] = @actor.usability[i]}
@framer = 0
@info_keys = ::Sprite.new(view)
@info_keys.bitmap = Bitmap.new(self.bitmap.width, self.bitmap.height)
@info_keys.x = self.x; @info_keys.y = self.y; @info_keys.z = self.z
draw_key_info
refresh_icons
refresh_texts
@view = view
@on_map = SceneManager.scene_is?(Scene_Map)
@mouse_exist = defined?(Map_Buttons).is_a?(String)
@mouse_exist = false if @mouse_exist && !SceneManager.scene_is?(Scene_Map)
update
end
def draw_key_info
@info_keys.bitmap.font.size = 15
letters = [Key::Weapon[1], Key::Armor[1], Key::Item[1], Key::Item2[1],
Key::Skill[1],Key::Skill2[1],Key::Skill3[1],Key::Skill4[1],Key::Follower[1]]
x = 28
for i in letters
@info_keys.bitmap.draw_text(x, -2, @info_keys.bitmap.width, 32, i)
x += 32
end
end
def refresh_texts
self.bitmap.clear
self.bitmap.font.size = 15
refresh_cooldown
refresh_ammo
end
def number(operand)
return (operand / 60).to_i + 1
end
def flagged(item, type)
return :false if !item.cool_enabled? and type == 1
return item.itemcost if type == 2
end
# Refresh toolbar icons
def refresh_icons
@icons.bitmap.clear
icon = [@actor.equips[0], @actor.equips[1], @actor.assigned_item,
@actor.assigned_item2, @actor.assigned_skill, @actor.assigned_skill2,
@actor.assigned_skill3, @actor.assigned_skill4, ToggleIcon]
x = 4
icon.each {|i|
if !i.nil? and !i.is_a?(Fixnum)
if i.is_a?(RPG::Item) || i.is_a?(RPG::Skill)
draw_icon(i.icon_index, x, 6, @actor.usable?(i))
else
if i.is_a?(RPG::Weapon)
enable = @actor.usability[0] ; enable = true if enable.nil?
draw_icon(i.icon_index, x, 6, enable)
elsif i.is_a?(RPG::Armor)
enable = @actor.usability[1] ; enable = true if enable.nil?
draw_icon(i.icon_index, x, 6, enable)
end
end
end
draw_icon(i, x, 6) if i.is_a?(Fixnum) ; x += 32}
@now_equip = [@actor.equips[0], @actor.equips[1], @actor.assigned_item,
@actor.assigned_item2, @actor.assigned_skill, @actor.assigned_skill2,
@actor.assigned_skill3, @actor.assigned_skill4]
end
def update
update_mouse_tiles if @mouse_exist
update_cooldown
update_ammo_tools
update_usability_enable
refresh_icons if @now_equip[0] != @actor.equips[0]
refresh_icons if @now_equip[1] != @actor.equips[1]
refresh_icons if @now_equip[2] != @actor.assigned_item
refresh_icons if @now_equip[3] != @actor.assigned_item2
refresh_icons if @now_equip[4] != @actor.assigned_skill
refresh_icons if @now_equip[5] != @actor.assigned_skill2
refresh_icons if @now_equip[6] != @actor.assigned_skill3
refresh_icons if @now_equip[7] != @actor.assigned_skill4
update_fade_effect
end
# fade effect when player is behind the toolbar
def update_fade_effect
if behind_toolbar?
if self.opacity >= 60
self.opacity -= 10
@layout.opacity = @icons.opacity = @info_keys.opacity = self.opacity
end
elsif self.opacity != 255
self.opacity += 10
@layout.opacity = @icons.opacity = @info_keys.opacity = self.opacity
end
end
def behind_toolbar?
return false unless @on_map
px = ($game_player.screen_x / 32).to_i
py = ($game_player.screen_y / 32).to_i
9.times.each {|x| return true if px == Tile_X + x and py == Tile_Y}
return false
end
# refresh the icons when the usability change
def update_usability_enable
8.times.each {|i| refresh_icons if @old_usability[i] != @actor.usability[i]}
end
#-----------------------------------------------
# ammunition engine
def ammo_ready?(item)
return false if item.nil?
return true if item.has_data.nil? && item.is_a?(RPG::Item) &&
item.consumable
return false if flagged(item, 2).nil?
return true if flagged(item, 2) != 0
return false
end
# get item cost
def itemcost(item)
return $game_party.item_number(item) if item.has_data.nil? &&
item.is_a?(RPG::Item) && item.consumable
if !flagged(item, 2).nil? and flagged(item, 2) != 0
return $game_party.item_number($data_items[flagged(item, 2)])
end
return 0
end
# Ammo refresher
def refresh_ammo
if ammo_ready?(@actor.equips[0])
@wnumber = itemcost(@actor.equips[0])
self.bitmap.draw_text(18, 24, 32,32, @wnumber.to_s, 1)
end
if ammo_ready?(@actor.equips[1])
@anumber = itemcost(@actor.equips[1])
self.bitmap.draw_text(50, 24, 32,32, @anumber.to_s, 1)
end
if ammo_ready?(@actor.assigned_item)
@inumber = itemcost(@actor.assigned_item)
self.bitmap.draw_text(82, 24, 32,32, @inumber.to_s, 1)
end
if ammo_ready?(@actor.assigned_item2)
@inumber2 = itemcost(@actor.assigned_item2)
self.bitmap.draw_text(112, 24, 32,32, @inumber2.to_s, 1) # item 2
end
if ammo_ready?(@actor.assigned_skill)
@snumber = itemcost(@actor.assigned_skill)
self.bitmap.draw_text(144, 24, 32,32, @snumber.to_s, 1)
end
if ammo_ready?(@actor.assigned_skill2)
@snumber2 = itemcost(@actor.assigned_skill2)
self.bitmap.draw_text(176, 24, 32,32, @snumber2.to_s, 1) # skill 2
end
if ammo_ready?(@actor.assigned_skill3)
@snumber3 = itemcost(@actor.assigned_skill3)
self.bitmap.draw_text(208, 24, 32,32, @snumber3.to_s, 1) # skill 3
end
if ammo_ready?(@actor.assigned_skill4)
@snumber4 = itemcost(@actor.assigned_skill4)
self.bitmap.draw_text(240, 24, 32,32, @snumber4.to_s, 1) # skill 4
end
end
def update_ammo_tools
refresh_texts if ammo_ready?(@actor.equips[0]) &&
@wnumber != itemcost(@actor.equips[0])
refresh_texts if ammo_ready?(@actor.equips[1]) &&
@anumber != itemcost(@actor.equips[1])
if ammo_ready?(@actor.assigned_item) &&
@inumber != itemcost(@actor.assigned_item)
refresh_texts
end
refresh_texts if ammo_ready?(@actor.assigned_item2) && #@inumber2
@inumber2 != itemcost(@actor.assigned_item2)
refresh_texts if ammo_ready?(@actor.assigned_skill) &&
@snumber != itemcost(@actor.assigned_skill)
refresh_texts if ammo_ready?(@actor.assigned_skill2) && #@snumber2
@snumber2 != itemcost(@actor.assigned_skill2)
# new anmmo
refresh_texts if ammo_ready?(@actor.assigned_skill3) && #@snumber3
@snumber3 != itemcost(@actor.assigned_skill3)
refresh_texts if ammo_ready?(@actor.assigned_skill4) && #@snumber4
@snumber4 != itemcost(@actor.assigned_skill4)
end
#--------------------------------------
# cooldown engine
def cool_down_active?
return true if skill_cooldown > 0 || weapon_cooldown > 0 ||
armor_cooldown > 0 || item_cooldown > 0 || skill_cooldown2 > 0 ||
item_cooldown2 > 0 || skill_cooldown3 > 0 || skill_cooldown4 > 0
return false
end
def weapon_cooldown
if !@actor.equips[0].nil?
return 0 if flagged(@actor.equips[0], 1) == :false
cd = @actor.weapon_cooldown[@actor.equips[0].id]
return cd unless cd.nil?
end
return 0
end
def armor_cooldown
if !@actor.equips[1].nil?
return 0 if flagged(@actor.equips[1], 1) == :false
cd = @actor.armor_cooldown[@actor.equips[1].id]
return cd unless cd.nil?
end
return 0
end
def item_cooldown
if !@actor.assigned_item.nil?
return 0 if flagged(@actor.assigned_item, 1) == :false
cd = @actor.item_cooldown[@actor.assigned_item.id]
return cd unless cd.nil?
end
return 0
end
def item_cooldown2
if !@actor.assigned_item2.nil?
return 0 if flagged(@actor.assigned_item2, 1) == :false
cd = @actor.item_cooldown[@actor.assigned_item2.id]
return cd unless cd.nil?
end
return 0
end
def skill_cooldown
if !@actor.assigned_skill.nil?
return 0 if flagged(@actor.assigned_skill, 1) == :false
cd = @actor.skill_cooldown[@actor.assigned_skill.id]
return cd unless cd.nil?
end
return 0
end
def skill_cooldown2
if !@actor.assigned_skill2.nil?
return 0 if flagged(@actor.assigned_skill2, 1) == :false
cd = @actor.skill_cooldown[@actor.assigned_skill2.id]
return cd unless cd.nil?
end
return 0
end
# two new skillls
def skill_cooldown3
if !@actor.assigned_skill3.nil?
return 0 if flagged(@actor.assigned_skill3, 1) == :false
cd = @actor.skill_cooldown[@actor.assigned_skill3.id]
return cd unless cd.nil?
end
return 0
end
def skill_cooldown4 # 4
if !@actor.assigned_skill4.nil?
return 0 if flagged(@actor.assigned_skill4, 1) == :false
cd = @actor.skill_cooldown[@actor.assigned_skill4.id]
return cd unless cd.nil?
end
return 0
end
# Cooldown refresher
def refresh_cooldown
wcd = number(weapon_cooldown)
self.bitmap.draw_text(18, 36,32,32, wcd.to_s, 1) if weapon_cooldown > 10
acd = number(armor_cooldown)
self.bitmap.draw_text(50, 36,32,32, acd.to_s, 1) if armor_cooldown > 10
icd = number(item_cooldown)
self.bitmap.draw_text(82, 36,32,32, icd.to_s, 1) if item_cooldown > 10
icd2 = number(item_cooldown2)
self.bitmap.draw_text(112, 36,32,32, icd2.to_s, 1) if item_cooldown2 > 10
scd = number(skill_cooldown)
self.bitmap.draw_text(144, 36,32,32, scd.to_s, 1) if skill_cooldown > 10
scd2 = number(skill_cooldown2)
self.bitmap.draw_text(176, 36,32,32, scd2.to_s, 1) if skill_cooldown2 > 10
scd3 = number(skill_cooldown3)
self.bitmap.draw_text(208, 36,32,32, scd3.to_s, 1) if skill_cooldown3 > 10
scd4 = number(skill_cooldown4)
self.bitmap.draw_text(240, 36,32,32, scd4.to_s, 1) if skill_cooldown4 > 10
end
def update_cooldown
if @on_map and @actor != $game_player.actor
@actor = $game_player.actor
refresh_icons
refresh_texts
end
if $game_player.refresh_skillbar > 0
$game_player.refresh_skillbar -= 1
if $game_player.refresh_skillbar == 0
@actor.apply_usability
refresh_icons
end
end
if cool_down_active?
refresh_texts if @framer == 0
@framer += 1; @framer = 0 if @framer == 10
else
@framer = 0
end
end
# if mouse exist update the mouse settings
def update_mouse_tiles
mx = (Mouse.pos[0] / 32) ; my = (Mouse.pos[1] / 32)
case [mx, my]
when [Tile_X, Tile_Y] then $game_player.mouse_over = 1
when [Tile_X + 1, Tile_Y] then $game_player.mouse_over = 2
when [Tile_X + 2, Tile_Y] then $game_player.mouse_over = 3
when [Tile_X + 3, Tile_Y] then $game_player.mouse_over = 4
when [Tile_X + 4, Tile_Y] then $game_player.mouse_over = 5
when [Tile_X + 5, Tile_Y] then $game_player.mouse_over = 6
when [Tile_X + 6, Tile_Y] then $game_player.mouse_over = 7
when [Tile_X + 7, Tile_Y] then $game_player.mouse_over = 8
when [Tile_X + 8, Tile_Y] then $game_player.mouse_over = 9
else
$game_player.mouse_over = 0 if $game_player.mouse_over != 0
end
if $game_player.mouse_over > 0
create_mouse_blink
update_mouse_blink_position
@mouse_blink.opacity -= 3
@mouse_blink.opacity = 70 if @mouse_blink.opacity <= 6
else
dispose_mouse_blink
end
end
# update mouse blink position
def update_mouse_blink_position
case $game_player.mouse_over
when 1 then @mouse_blink.x = @layout.x + (5)
when 2 then @mouse_blink.x = @layout.x + (5 + 32)
when 3 then @mouse_blink.x = @layout.x + (5 + 64)
when 4 then @mouse_blink.x = @layout.x + (5 + 96)
when 5 then @mouse_blink.x = @layout.x + (5 + 128)
when 6 then @mouse_blink.x = @layout.x + (5 + 160)
when 7 then @mouse_blink.x = @layout.x + (5 + 192)
when 8 then @mouse_blink.x = @layout.x + (5 + 224)
when 9 then @mouse_blink.x = @layout.x + (5 + 256)
end
end
def create_mouse_blink
return if !@mouse_blink.nil?
@mouse_blink = ::Sprite.new(@view)
@mouse_blink.bitmap = Bitmap.new(22, 22)
@mouse_blink.bitmap.fill_rect(0, 0, 22, 22, Color.new(255,255,255))
@mouse_blink.y = @layout.y + 8
@mouse_blink.z = self.z
@mouse_blink.opacity = 70
end
def dispose_mouse_blink
return if @mouse_blink.nil?
@mouse_blink.dispose
@mouse_blink = nil
end
#--------- end of mouse settings
def dispose
self.bitmap.dispose
@layout.bitmap.dispose
@layout.dispose
@icons.bitmap.dispose
@icons.dispose
@info_keys.bitmap.dispose
@info_keys.dispose
super
end
def draw_icon(icon_index, x, y, enabled = true)
bit = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
@icons.bitmap.blt(x, y, bit, rect, enabled ? 255 : 150)
end
end |
Администратор запретил публиковать записи гостям.
|
Falcao Pearl ABS Liquid V3. Скрыть HUD. 9 года 7 мес. назад #80829
|
В Kernel есть такая опция, внимательней.
|
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: Lytik
|
Falcao Pearl ABS Liquid V3. Скрыть HUD. 9 года 7 мес. назад #80830
|
|
My projects/Мои проекты Я ухожу — не говорю «пока», Я прихожу — не говоря «привета»… Когда по небу бродят облака — Никто не осуждает их за это!
Администратор запретил публиковать записи гостям.
За этот пост поблагодарили: Lytik
|
Falcao Pearl ABS Liquid V3. Скрыть HUD. 9 года 7 мес. назад #80831
|
Спасибо, разобрался
|
Администратор запретил публиковать записи гостям.
|
Модераторы: NeKotZima
Время создания страницы: 0.268 секунд