Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.



 
Trang ChínhPortalTìm kiếmLatest imagesĐăng kýĐăng Nhập
Bài gửiNgười gửiThời gian
GAME nhập vai - Gta San Andreas phiên bản multiplayer. Script : hiện tên địa danh 115/11/2014, 22:08
Tài nguyên game bang bang zing me Script : hiện tên địa danh 114/11/2014, 07:32
Hướng dẫn làm nhân vật di chuyển Script : hiện tên địa danh 114/11/2014, 06:57
Cách sử dụng code current Script : hiện tên địa danh 114/11/2014, 06:52
Em xin làm đoạn video do em tự dẫn giúp cho các anh chị nào không biết các công cụ trong game maker Script : hiện tên địa danh 114/11/2014, 06:50
Cần tài nguyên game Võ đài thần tiên Script : hiện tên địa danh 114/11/2014, 06:39
Tải RPG XP + Việt Hóa Script : hiện tên địa danh 127/9/2014, 18:50
Bản hướng dẫn RPGXP đây..... Script : hiện tên địa danh 127/9/2014, 13:43
can giup Script : hiện tên địa danh 127/9/2014, 13:40
can giup Script : hiện tên địa danh 127/9/2014, 13:36
sự thật về vtc academy hcm Script : hiện tên địa danh 122/10/2013, 20:07
[vnplay.org]MU Việt Season 6.3 - Reset Và Non Reset -Không Webshop - Open tháng 5 Script : hiện tên địa danh 14/5/2013, 15:35
Phần trang bị giống game diablo Script : hiện tên địa danh 113/3/2013, 18:31
Game4V và Event "Viết bài hay, nhận ngay quà tặng" Script : hiện tên địa danh 119/2/2012, 21:24
HELP: Failed to create process Script : hiện tên địa danh 113/12/2011, 11:27
Danh hiệu member Script : hiện tên địa danh 16/12/2011, 13:02
TRY.VN RA MẮT CỤM MÁY CHỦ MỚI : HOÀN MỸ - OPEN 22/11 - ĐỈNH CAO MU ONLINE Script : hiện tên địa danh 123/11/2011, 07:44
MU 24 Giờ - Cực khó dành cho game thủ đích thực - Open Beta vào lúc 11h ngày 11/11/2011 Script : hiện tên địa danh 119/11/2011, 18:55
wqswqdqw Script : hiện tên địa danh 123/10/2011, 21:51
Diễn đàn Make Game VN chính thức Script : hiện tên địa danh 131/8/2011, 10:29

Share | 
 

 Script : hiện tên địa danh

Xem chủ đề cũ hơn Xem chủ đề mới hơn Go down 
Tác giảThông điệp
duongtiep
Level 15
Level 15
duongtiep

Danh hiệu : The King
Tổng số bài gửi : 1229
MGV Xu : 2677
Danh tiếng : 45
Ngày tham gia : 10/12/2010
Đến từ : Quảng Ninh

Script : hiện tên địa danh Empty
Bài gửiTiêu đề: Script : hiện tên địa danh   Script : hiện tên địa danh I_icon_minitime15/12/2010, 19:36

Tác dụng : hiện tên map
Tác giải : không rõ
Script :
Code:
#==============================================================================
# ** TDS Map Name Pop-Up
# Version: 1.5
#------------------------------------------------------------------------------
# This script will display the name of the map when you enter it.
#==============================================================================
# WARNING:
#
# Do not release, distribute or change my work without my expressed written
# consent, doing so violates the terms of use of this work.
#
# * Not Knowing English or understanding these terms will not excuse you in any
#  way from the consequenses.
#
# Contact Email: Sephirothtds@hotmail.com
#==============================================================================
# Instructions:
#
# To not show the map name use this in a call script.
# $game_temp.show_map_pop_up = false
#
# To make it show the name of the map again
# $game_temp.show_map_pop_up = true
#
#
# For changing the position of where the window shows up use this in a script
# call:
#
# $game_temp.map_pop_up_position = Value
#
# Value = Is the numerical value for the postion of the window.
# 1 = up
# 2 = down
#
# Example:
#  $game_temp.map_pop_up_position = 1
#
# To call the map name window in any place you wish simply use this in a call
# script.
#
# $game_temp.map_pop_up_force_show = true
#
#==============================================================================

  #--------------------------------------------------------------------------
  # * Constants
  #--------------------------------------------------------------------------
  # Constant to hold value for time
  MAP_NAME_DISPLAY_TIME = 120
  # Constant to determine if at the start of the game the window will show
  MAP_NAME_DISPLAY_NEW_GAME = false
 
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
# The instance of this class is referenced by $game_temp.
#==============================================================================

class Game_Temp
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :show_map_pop_up            # Display flag for effect
  attr_accessor :map_pop_up_position        # Position of the Map name window 
  attr_accessor :map_pop_up_force_show      # Forced showing flag 
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_game_temp_initialize initialize 
  def initialize
    @show_map_pop_up = true
    @map_pop_up_position = 1
    @map_pop_up_force_show = false
    tds_map_name_popup_game_temp_initialize
  end
end


#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs the title screen processing.
#==============================================================================

class Scene_Title < Scene_Base
  #--------------------------------------------------------------------------
  # * Command: New Game
  #--------------------------------------------------------------------------
  def command_new_game
    confirm_player_location
    Sound.play_decision
    $game_party.setup_starting_members            # Initial party
    $game_map.setup($data_system.start_map_id)    # Initial map position
    $game_player.moveto($data_system.start_x, $data_system.start_y)
    $game_player.refresh
    $scene = Scene_Map.new(MAP_NAME_DISPLAY_NEW_GAME)
    RPG::BGM.fade(1500)
    close_command_window
    Graphics.fadeout(60)
    Graphics.wait(40)
    Graphics.frame_count = 0
    RPG::BGM.stop
    $game_map.autoplay
  end
end

#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_initialize initialize
  def initialize(show_map_name = $game_temp.show_map_pop_up)
    @show_map_name = show_map_name
    @current_map_id = $game_map.map_id
    tds_map_name_popup_initialize
  end 
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_start start 
  def start
    super
    $game_map.refresh
    @spriteset = Spriteset_Map.new
    @message_window = Window_Message.new
    # Get the name of the current map
    get_map_name   
    # Create Map Pop Up window
    create_map_name_window 
    # If not
    if @show_map_name
      @map_name_display.open       
    end 
  tds_map_name_popup_start 
  end
  #--------------------------------------------------------------------------
  # * Get Map Name
  #--------------------------------------------------------------------------
  def get_map_name
    # Current Map ID
    @current_map_id = $game_map.map_id   
    # Set Map Name
    @map = load_data("Data/MapInfos.rvdata")
    @map_name = @map[$game_map.map_id].name       
    return
  end
  #--------------------------------------------------------------------------
  # * Create Map Name Window
  #--------------------------------------------------------------------------
  def create_map_name_window 
    # Map Counter timer initial time
    @map_counter = 0
    @map_counter %= MAP_NAME_DISPLAY_TIME
    @map_name_display = Window_Base.new(0, 5, Graphics.width, 64)   
    width = @map_name_display.contents.text_size(@map_name.to_s).width
    @map_name_display.width = width + 60
    @map_name_display.x = Graphics.width / 2 - @map_name_display.width / 2
    @map_name_display.y =  ($game_temp.map_pop_up_position == 1 ? 5 : 350 )
    @map_name_display.create_contents
    @map_name_display.openness = 0   
    @map_name_display.contents.draw_text(0,0, width + 29, 32, @map_name.to_s,1)   
  end 
  #--------------------------------------------------------------------------
  # * Show Map Name Window
  #--------------------------------------------------------------------------
  def show_map_name_window
    return if $game_temp.show_map_pop_up == false
    $game_temp.map_pop_up_force_show = false if $game_temp.map_pop_up_force_show     
    get_map_name     
    if @map_name_display.disposed?
      create_map_name_window       
    end
    @map_counter = 0   
    @map_name_display.visible = true   
    @map_name_display.open         
  end
  #--------------------------------------------------------------------------
  # * Player Transfer  Processing
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_update_transfer_player update_transfer_player
  def update_transfer_player
    return unless $game_player.transfer?
    fade = (Graphics.brightness > 0)
    fadeout(30) if fade
    @spriteset.dispose              # Dispose of sprite set
    if !@map_name_display.disposed?
    @map_name_display.dispose      # Dispose of display window
    end
    $game_player.perform_transfer  # Execute player transfer
    $game_map.autoplay              # Automatically switch BGM and BGS
    $game_map.update
    Graphics.wait(15)
    @spriteset = Spriteset_Map.new  # Recreate sprite set
    fadein(30) if fade
    Input.update
    # If current map is not the same as the old one
    if @current_map_id != $game_map.map_id
      show_map_name_window
    end
    tds_map_name_popup_update_transfer_player   
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_update update
  def update
    super
    @map_counter += 1  if @map_counter != MAP_NAME_DISPLAY_TIME
    @map_name_display.update if !@map_name_display.disposed?

    if $game_temp.map_pop_up_force_show   
      show_map_name_window
    end
   
    if !@map_name_display.disposed?
    if @map_name_display.openness == 255 and @map_counter == MAP_NAME_DISPLAY_TIME
      @map_name_display.close 
      @map_counter = 0
      end
    end
    tds_map_name_popup_update       
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_terminate terminate 
  def terminate
    @map_name_display.dispose
    tds_map_name_popup_terminate   
    super
  end   
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs the menu screen processing.
#==============================================================================

class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_menu_update_command_selection update_command_selection
  def update_command_selection
    tds_map_name_popup_menu_update_command_selection   
    if Input.trigger?(Input::B)
      Sound.play_cancel
      # Test - Once you go back to map name wont show again
      $scene = Scene_Map.new(false)
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # Item
        $scene = Scene_Item.new
      when 1,2,3  # Skill, equipment, status
        start_actor_selection
      when 4      # Save
        $scene = Scene_File.new(true, false, false)
      when 5      # End Game
        $scene = Scene_End.new
      end
    end
  end
end

#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * End Battle
  #    result : Results (0: win, 1: escape, 2:lose)
  #--------------------------------------------------------------------------
  alias tds_map_name_popup_battle_battle_end battle_end 
  def battle_end(result)
    tds_map_name_popup_battle_battle_end(result)   
    if result == 2 and not $game_troop.can_lose
      call_gameover
    else
      $game_party.clear_actions
      $game_party.remove_states_battle
      $game_troop.clear
      if $game_temp.battle_proc != nil
        $game_temp.battle_proc.call(result)
        $game_temp.battle_proc = nil
      end
      unless $BTEST
        $game_temp.map_bgm.play
        $game_temp.map_bgs.play
      end
      $scene = Scene_Map.new(false)
      @message_window.clear
      Graphics.fadeout(30)
    end
    $game_temp.in_battle = false
  end
end
Gọi script :
Chỉ hiện thị 1 map (Map nào được gọi lệnh này thì chỉ map đó được hiện tên)
Code:
$game_temp.map_pop_up_force_show = true

Không hiện thị : không hiện thị map có event gọi lênh dưới đây
Code:
$game_temp.show_map_pop_up = false

Để hiện tên ở tất cả các map : gọi lệnh sau ở map đầu tiên
Code:
$game_temp.map_pop_up_force_show = true
Chữ ký của duongtiep
Về Đầu Trang Go down
https://makegame.forumvi.com
 

Script : hiện tên địa danh

Xem chủ đề cũ hơn Xem chủ đề mới hơn Về Đầu Trang 

 Similar topics

+
Trang 1 trong tổng số 1 trang

Permissions in this forum:Bạn không có quyền trả lời bài viết
 :: RPG VX :: Script-
Chuyển đến