Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V  < 1 2  
Closed TopicStart new topic
> Map Loction HUD
blakerrdurr
post Aug 15 2010, 09:53 AM
Post #21


Level 1
Group Icon

Group: Member
Posts: 5
Type: Developer
RM Skill: Skilled




thanks! smile.gif it works great.
Go to the top of the page
 
+Quote Post
   
oekoeloe
post Aug 27 2010, 09:04 AM
Post #22


Level 1
Group Icon

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




Hey,
How do I make it use the default skin of RPG maker:
$game_system.windowskin_name

???

thanks for the script :D
Go to the top of the page
 
+Quote Post
   
andry5ury4
post Feb 18 2012, 02:15 AM
Post #23


Level 1
Group Icon

Group: Member
Posts: 5
Type: Artist
RM Skill: Beginner




Is this for XP???? are someone can change it into VX???? pleasee I really need It ^^


__________________________
Andry Surya Anugrah @

Go to the top of the page
 
+Quote Post
   
Night_Runner
post Feb 18 2012, 04:39 AM
Post #24


Level 50
Group Icon

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




Since you said please smile.gif

CODE
#==============================================================================
# VX: Map_Loction
#------------------------------------------------------------------------------
# simple map loction ,iam typr note if you want to changr happy.gif
# by Hunter x
# v. 1.0
# Recoded to work with RPG Maker VX by Night_Runner
#  @ http://www.rpgrevolution.com/forums/index.php?showtopic=15474
#==============================================================================

module LSRS
  
  
  module ScriptConfig_001
    
    # time for the hud hidden
    Timer = 150
    
    # pictur loction must be on ( Windowskin )
    BackGroundImage = "Chip_Location"
    
    # Position(3=down 9=up)
    Position = 9
    
    # Opacity of the Hud
    Opacity = 155
    
    # Position of the Font (0:Left 1:Midlle 2:right)
    LabelPosition = 1
    
    # Font Type and Color
    LabelFont = Font.new(["MS UI Gothic", "Tahoma", "Tahoma"])
    LabelFont.color = Color.new(0, 0, 0)
    #LabelFont.size = 22      #Size of the font
    #LabelFont.bold = false   # (true : bold, false :Normal)
    #LabelFont.italic = false # (true : italic, false :Normal)
  end
end

# Dont touch happy.gif
class LSRS::Sprite_Location < Sprite
  include LSRS::ScriptConfig_001
  @@cache = {}
  
  
  def initialize(text)
    super()
    self.z = 9996
    self.opacity = 0
    @count = 0
    @text = text
    refresh
    set_align
  end
  
  
  def update
    if @text != $game_map.map_name
      @text = $game_map.map_name
      refresh
    end
    if $game_map.interpreter.running?
      
      self.opacity -= 24
      
      @count = 0
    elsif @count.zero?
      self.opacity -= 12
    elsif self.opacity < Opacity
      self.opacity = [self.opacity += 12, Opacity].min
    else
      @count -= 1
    end
  end
  
  
  def refresh
    if @text.empty?
      
      self.visible = false
      return
    end
    if @@cache[@text]
      self.bitmap = @@cache[@text]
      self.bitmap.font.name = LabelFont.name
      self.bitmap.font.color = LabelFont.color
    else
      self.bitmap = Cache.system(BackGroundImage)
      self.bitmap.font.name = LabelFont.name
      self.bitmap.font.color = LabelFont.color
      
      self.bitmap.draw_text(self.bitmap.rect, @text, LabelPosition)
      @@cache[@text] = self.bitmap
    end
    self.visible = true
    @count = Timer
  end
  
  
  def set_align
    self.x = case Position % 3
      when 1 then 0
      when 2 then (Graphics.width - self.width) / 2
      else Graphics.width - self.width
    end
    self.y = case Position
      when 1 .. 3 then Graphics.height - self.height
      when 4 .. 6 then (Graphics.height - self.height) / 2
      else 0
    end
  end
  
  
  def height
    self.bitmap ? self.bitmap.rect.height : 0
  end
  
  
  def width
    self.bitmap ? self.bitmap.rect.width : 0
  end
end


class Game_Map
  @@mapinfo = load_data("Data/MapInfos.rvdata")
  
  
  def map_name(id = @map_id)
    @@mapinfo[id].name.sub(/@.*/, "")
  end
end


class Scene_Map
  alias :main_lsrs1 :main
  alias :update_lsrs1 :update
  

  def main
    @location_sprite = LSRS::Sprite_Location.new($game_map.map_name)
    main_lsrs1
    @location_sprite.dispose
  end
  

  def update
    update_lsrs1
    @location_sprite.update
  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
   

2 Pages V  < 1 2
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 07:00 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker