Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Enquip HUD is disappeared by opening of a menu
drspider
post Dec 12 2011, 09:53 AM
Post #1



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




Hello all,

I have a litte problem..

When I open my menu or skill/item menu my equip HUD is disappeared.....

here a screenshot what i mean..

spoilers


Script

CODE
#_______________________________________________________________________________
# MOG MPW Equip V1.1            
#_______________________________________________________________________________
# By Moghunter  
#_______________________________________________________________________________
if true # True = Enable / False = Disable (Script)
module MOG
#Disable Window Switch ID.
EQPMAPVIS = 4  
#Window opacity.
EQPMAPOPA = 0
#Windowskin name.
EQPMAPSKIN = "001-Blue01"
#HUD Position.
EQPMAPX = 290 #X Pos
EQPMAPY = 390 #Y Pos
end
$mogscript = {} if $mogscript == nil
$mogscript["mpequip"] = true
###############
# Window_Base #
###############
class Window_Base < Window  
def draw_equip_map(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x + 3, y + 34, bitmap, Rect.new(0, 0, 24, 24))
end
def draw_mequip(x, y)
mequip = RPG::Cache.picture("Mequip")    
cw = mequip.width
ch = mequip.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65 ,mequip, src_rect)
end
end
####################
# Window_Equip_Map #
####################
class Window_Equipmap < Window_Base
def initialize(actor)
super(0, 0, 190, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = MOG::EQPMAPOPA
self.windowskin = RPG::Cache.windowskin(MOG::EQPMAPSKIN)
@actor = actor
refresh
end  
def refresh
self.contents.clear
draw_mequip(0,0)
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
self.contents.font.color = system_color
draw_equip_map(@data[0], 32 * 0, 0)
draw_equip_map(@data[1], 32 * 1, 0)
draw_equip_map(@data[2], 32 * 2, 0)
draw_equip_map(@data[3], 32 * 3, 0)
draw_equip_map(@data[4], 32 * 4, 0)
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog8_main main
def main
@actor = $game_party.actors[0]
@eqmap = Window_Equipmap.new(@actor)
@eqmap.x = MOG::EQPMAPX
@eqmap.y = MOG::EQPMAPY
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true  
else
@eqmap.visible = false    
end      
mog8_main
@eqmap.dispose
end
alias mog8_update update
def update
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true  
else
@eqmap.visible = false    
end  
if $eref == true
@eqmap.refresh
$eref = false
end
mog8_update
end  
end  
############
# Game_Map #
############
class Game_Map
attr_accessor :eref
end
class Interpreter
def eref
$eref = true
end
alias mog319ref command_319
def command_319
eref
return mog319ref
end
alias mog321ref command_321
def command_321
eref
return mog321ref
end
end
end


How to fix this? thanks


Please use spoilers for wide images and long scripts happy.gif
~ Night5h4d3


This post has been edited by Night5h4d3: Dec 13 2011, 05:22 AM
Reason for edit: added spoilers
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Dec 13 2011, 05:17 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,527
Type: Scripter
RM Skill: Undisclosed




I'm just guessing here, but I believe that this should fix it.

CODE
#_______________________________________________________________________________
# MOG MPW Equip V1.1            
#_______________________________________________________________________________
# By Moghunter  
#_______________________________________________________________________________
if true # True = Enable / False = Disable (Script)
module MOG
#Disable Window Switch ID.
EQPMAPVIS = 4  
#Window opacity.
EQPMAPOPA = 0
#Windowskin name.
EQPMAPSKIN = "001-Blue01"
#HUD Position.
EQPMAPX = 290 #X Pos
EQPMAPY = 390 #Y Pos
end
$mogscript = {} if $mogscript == nil
$mogscript["mpequip"] = true
###############
# Window_Base #
###############
class Window_Base < Window  
def draw_equip_map(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x + 3, y + 34, bitmap, Rect.new(0, 0, 24, 24))
end
def draw_mequip(x, y)
mequip = RPG::Cache.picture("Mequip")    
cw = mequip.width
ch = mequip.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65 ,mequip, src_rect)
end
end
####################
# Window_Equip_Map #
####################
class Window_Equipmap < Window_Base
def initialize(actor)
super(0, 0, 190, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = MOG::EQPMAPOPA
self.windowskin = RPG::Cache.windowskin(MOG::EQPMAPSKIN)
@actor = actor
refresh
end  
def refresh
self.contents.clear
draw_mequip(0,0)
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
self.contents.font.color = system_color
draw_equip_map(@data[0], 32 * 0, 0)
draw_equip_map(@data[1], 32 * 1, 0)
draw_equip_map(@data[2], 32 * 2, 0)
draw_equip_map(@data[3], 32 * 3, 0)
draw_equip_map(@data[4], 32 * 4, 0)
end
end
#############
# Scene_Map #
#############
class Spriteset_Map
alias mog8_initialize  initialize
def initialize
actor = $game_party.actors[0]
@eqmap = Window_Equipmap.new(actor)
@eqmap.x = MOG::EQPMAPX
@eqmap.y = MOG::EQPMAPY
mog8_initialize
end
alias mog8_dispose  dispose
def dispose
@eqmap.dispose
mog8_dispose
end
alias mog8_update update
def update
@eqmap.visible = !$game_switches[MOG::EQPMAPVIS]
if $eref == true
@eqmap.refresh
$eref = false
end
mog8_update
end  
end  
############
# Game_Map #
############
class Game_Map
attr_accessor :eref
end
class Interpreter
def eref
$eref = true
end
alias mog319ref command_319
def command_319
eref
return mog319ref
end
alias mog321ref command_321
def command_321
eref
return mog321ref
end
end
end


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
drspider
post Dec 13 2011, 10:44 AM
Post #3



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




It works thanks!

But another question

The equip items (sword, armor) is not refreshing in the equip HUD... till you close the window
Is there a fix for?

This post has been edited by drspider: Dec 13 2011, 10:44 AM
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 01:58 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker