Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o tema • Voltar para a ficha do tema
[Resolvido] Script Nome do Mapa
2 participantes
Aldeia RPG :: RPG Maker :: Rpg Maker XP :: Dúvidas e pedidos
Página 1 de 1
[Resolvido] Script Nome do Mapa
Já vi um script que faz aparecer um nome do mapa na tela e depois ele sai, mas nao sei onde encontra-lo!!!!
Tentei usar um, mas o nome fica na tela, e isso gera mt lag...
Alguem tem o script de nome do mapa?
Tentei usar um, mas o nome fica na tela, e isso gera mt lag...
Alguem tem o script de nome do mapa?
Lamina- Iniciante
- Mensagens : 75
Créditos : 0
Re: [Resolvido] Script Nome do Mapa
Toma ai espero que você goste, coloca uma imagem Mpname dentro da pasta picture, não tenho uma aqui agora mais funciona
- Spoiler:
- #_______________________________________________________________________________
# MOG_Location_Name V2.3
#_______________________________________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_______________________________________________________________________________
# Apresenta o nome do mapa.
# É preciso ter uma imagem com o nome de "Mpname" dentro
# da pasta pictures.
#_______________________________________________________________________________
module MOG
#Nome da fonte.
LOCATION_FONT_NAME = "Georgia"
#Tamanho da fonte.
LOCATION_FONT_SIZE = 20
#Fonte com contorno.
LOCATION_FONT_BOLD = true
#Fonte em italico
LOCATION_FONT_ITALIC = true
#Tempo de permanencia da janela.
LOCATION_TIME = 1
#Ativar efeito de zoom
LOCATION_ZOOM_EFFECT = true
#Posição horizontal da janela
LOCATION_X = 220
#Posição vertical da janela
LOCATION_Y = 220
#Posição do texto.
LOCATION_TEXT_X = 30
LOCATION_TEXT_Y = 10
#ID da Swicht que desativa a janela
LOCATION_SWITCH_OFF = 15
end
#==============================================================================
# Game_Temp
#==============================================================================
class Game_Temp
attr_accessor :loc_time
attr_accessor :loc_name_x
attr_accessor :loc_name_y
attr_accessor :loc_name_zoom_x
attr_accessor :loc_name_zoom_y
attr_accessor :loc_name_opa
attr_accessor :loc_layout_x
attr_accessor :loc_layout_y
attr_accessor :loc_layout_zoom_x
attr_accessor :loc_layout_zoom_y
attr_accessor :loc_layout_opa
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------
alias mog_animapname_initialize initialize
def initialize
mog_animapname_initialize
@loc_time = 40 * MOG::LOCATION_TIME
@loc_name_x = 60
@loc_name_y = 0
@loc_name_zoom_x = 1.2
@loc_name_zoom_y = 1.2
@loc_name_opa = 255
@loc_layout_x = -60
@loc_layout_y = 0
@loc_layout_zoom_x = 1
@loc_layout_zoom_y = 1
@loc_layout_opa = 255
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
attr_reader :map_id
#--------------------------------------------------------------------------
# Mpname
#--------------------------------------------------------------------------
def mpname
$mpname = load_data("Data/MapInfos.rxdata")
$mpname[@map_id].name
end
end
#==============================================================================
# Sprite_Location
#==============================================================================
class Sprite_Location < Sprite
include MOG
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------
def initialize
@viewport = Viewport.new(0, 0, 640, 480)
@viewport.z = 99999
super(@viewport)
@layout = Sprite.new
@layout.bitmap = RPG::Cache.picture("Mpname")
@layout.z = 9998
@layout.ox = -LOCATION_X + $game_temp.loc_layout_x
@layout.oy = -LOCATION_Y + $game_temp.loc_layout_y
@layout.opacity = $game_temp.loc_layout_opa
@location_name = Sprite.new
@location_name.bitmap = Bitmap.new(200,60)
@location_name.z = 9999
@location_name.bitmap.font.size = LOCATION_FONT_SIZE
@location_name.bitmap.font.name = LOCATION_FONT_NAME
@location_name.bitmap.font.bold = LOCATION_FONT_BOLD
@location_name.bitmap.font.italic = LOCATION_FONT_BOLD
@location_name.ox = -LOCATION_X + $game_temp.loc_name_x
@location_name.oy = -LOCATION_Y + $game_temp.loc_name_y
@location_name.opacity = $game_temp.loc_name_opa
@location_name.bitmap.draw_text(30 + LOCATION_TEXT_X, 0 + LOCATION_TEXT_Y, 130, 60, $game_map.mpname.to_s,1)
@location_anime_time = 20
if LOCATION_ZOOM_EFFECT == true
@location_name.zoom_x = $game_temp.loc_name_zoom_x
@location_name.zoom_y = $game_temp.loc_name_zoom_y
@layout.zoom_x = $game_temp.loc_layout_zoom_x
@layout.zoom_y = $game_temp.loc_layout_zoom_y
end
if $game_switches[MOG::LOCATION_SWITCH_OFF] == true
@location_name.visible = false
@layout.visible = false
else
@location_name.visible = true
@layout.visible = true
end
update
end
#--------------------------------------------------------------------------
# Dispose
#--------------------------------------------------------------------------
def dispose
if @layout != nil
@layout.bitmap.dispose
@layout.dispose
@layout = nil
end
if @location_name != nil
@location_name.bitmap.dispose
@location_name.dispose
@location_name = nil
end
if @viewport != nil
@viewport.dispose
@viewport = nil
end
end
#--------------------------------------------------------------------------
# Refresh
#--------------------------------------------------------------------------
def refresh
$game_temp.loc_time = 40 * LOCATION_TIME
$game_temp.loc_layout_opa = 255
$game_temp.loc_name_opa = 255
$game_temp.loc_layout_x = -60
$game_temp.loc_name_x = 60
$game_temp.loc_layout_opa = 0
$game_temp.loc_name_opa = 0
$game_temp.loc_layout_zoom_x = 1
$game_temp.loc_layout_zoom_y = 1
$game_temp.loc_name_zoom_x = 1.2
$game_temp.loc_name_zoom_y = 1.2
@location_name.bitmap.clear
@location_name.bitmap.draw_text(30 + LOCATION_TEXT_X, 0 + LOCATION_TEXT_Y, 130, 60, $game_map.mpname.to_s,1)
@location_anime_time = 20
end
#--------------------------------------------------------------------------
# Update
#--------------------------------------------------------------------------
def update
location_effect_update
visible_update
end
#--------------------------------------------------------------------------
# Visible Update
#--------------------------------------------------------------------------
def visible_update
if $game_switches[MOG::LOCATION_SWITCH_OFF] == true
@location_name.visible = false
@layout.visible = false
else
@location_name.visible = true
@layout.visible = true
end
end
#--------------------------------------------------------------------------
# Location Effect Update
#--------------------------------------------------------------------------
def location_effect_update
@location_anime_time -= 1 if @location_anime_time > 0
if @location_anime_time <= 0
$game_temp.loc_time -= 1 if $game_temp.loc_time > 0
end
@layout.ox = -LOCATION_X + $game_temp.loc_layout_x
@layout.oy = -LOCATION_Y + $game_temp.loc_layout_y
@layout.opacity = $game_temp.loc_layout_opa
@location_name.ox = -LOCATION_X + $game_temp.loc_name_x
@location_name.oy = -LOCATION_Y + $game_temp.loc_name_y
@location_name.opacity = $game_temp.loc_name_opa
if LOCATION_ZOOM_EFFECT == true
@location_name.zoom_x = $game_temp.loc_name_zoom_x
@location_name.zoom_y = $game_temp.loc_name_zoom_y
@layout.zoom_x = $game_temp.loc_layout_zoom_x
@layout.zoom_y = $game_temp.loc_layout_zoom_y
end
if $game_temp.loc_name_x > 0 and
$game_temp.loc_time > 0
$game_temp.loc_name_x -= 3
$game_temp.loc_layout_x += 3
$game_temp.loc_layout_opa += 7
$game_temp.loc_name_opa += 7
$game_temp.loc_name_zoom_x -= 0.01
$game_temp.loc_name_zoom_y -= 0.01
elsif $game_temp.loc_name_x <= 0 and
$game_temp.loc_time > 0
$game_temp.loc_name_x = 0
$game_temp.loc_layout_x = 0
$game_temp.loc_layout_opa = 255
$game_temp.loc_name_opa = 255
$game_temp.loc_name_zoom_x = 1
$game_temp.loc_name_zoom_y = 1
$game_temp.loc_layout_zoom_x = 1
$game_temp.loc_layout_zoom_y = 1
$game_temp.loc_name_zoom_x = 1
$game_temp.loc_name_zoom_y = 1
end
if $game_temp.loc_time <= 0 and
$game_temp.loc_layout_opa > 0
$game_temp.loc_layout_opa -= 10
$game_temp.loc_name_opa -= 10
if LOCATION_ZOOM_EFFECT == true
$game_temp.loc_layout_x -= 9
$game_temp.loc_layout_zoom_x -= 0.02
else
$game_temp.loc_layout_x += 3
end
$game_temp.loc_name_x -= 3
end
end
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# Main
#--------------------------------------------------------------------------
alias location_name_main main
def main
@map_name = Sprite_Location.new
location_name_main
@map_name.dispose
@map_name = nil
end
#--------------------------------------------------------------------------
# Update
#--------------------------------------------------------------------------
alias location_update update
def update
location_update
if @map_name != nil
@map_name.update
end
end
#--------------------------------------------------------------------------
# Transfer Player
#--------------------------------------------------------------------------
alias location_name_transfer_player transfer_player
def transfer_player
location_name_transfer_player
if @map_name != nil
@map_name.refresh
end
end
end
$mog_rgss_location_name = true
_________________
matheus180- Desenvolvedor
- Mensagens : 749
Créditos : 174
Tópicos semelhantes
» Script para nome do mapa
» [Resolvido]Script de Nome Secundário
» [Resolvido] Alguem sabe se existe um script de mini mapa compativel com o np master v3?
» Mapa sem nome
» Nome do Mapa na Tela com HUD
» [Resolvido]Script de Nome Secundário
» [Resolvido] Alguem sabe se existe um script de mini mapa compativel com o np master v3?
» Mapa sem nome
» Nome do Mapa na Tela com HUD
Aldeia RPG :: RPG Maker :: Rpg Maker XP :: Dúvidas e pedidos
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|