设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

关于对话框

查看数: 4524 | 评论数: 16 | 收藏 1
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2014-5-1 11:44

正文摘要:

大家都玩过海底囚人的游戏吧QWQ我想知道他游戏里的那种对话框怎么做的

回复

a65868886 发表于 2014-5-2 16:44:42
a65868886 发表于 2014-5-1 17:14
如果要画对话框的画,格式大概是怎样的?

是像原对话框样式那样画四个格子吗0.0
taroxd 发表于 2014-5-1 17:59:06
a65868886 发表于 2014-5-1 17:42
QAQ可是你们都没告诉我改怎么做啊

脚本的注释部分都写着
a65868886 发表于 2014-5-1 17:42:48
taroxd 发表于 2014-5-1 17:39
你不是问过了么……

QAQ可是你们都没告诉我改怎么做啊
taroxd 发表于 2014-5-1 17:39:26
你不是问过了么……
a65868886 发表于 2014-5-1 17:19:43
Dream_tim 发表于 2014-5-1 17:11
将你的对话框图片重命名为MsgImage。
然后插入到素材文件夹里的system中即可。 ...

我把问题修改的详细些了,回到一楼去看看QWQ

点评

直接导入素材先试一试,我没有测试过。  发表于 2014-5-1 17:21
a65868886 发表于 2014-5-1 17:14:02
Dream_tim 发表于 2014-5-1 17:11
将你的对话框图片重命名为MsgImage。
然后插入到素材文件夹里的system中即可。 ...

如果要画对话框的画,格式大概是怎样的?

点评

宽就是游戏画面的宽,高自己掂量着吧,最好是和原对话框显示的高一样,不然还需要其他辅助脚本。  发表于 2014-5-1 17:16
Dream_tim 发表于 2014-5-1 17:11:41
a65868886 发表于 2014-5-1 17:05
#------------------------------------------------------------------------------#
#  Galv's Message ...

将你的对话框图片重命名为MsgImage。
然后插入到素材文件夹里的system中即可。
a65868886 发表于 2014-5-1 17:05:34
Dream_tim 发表于 2014-5-1 17:01
如果有这个脚本,就把脚本发上来,不然我们怎么去解答你的问题。

#------------------------------------------------------------------------------#
#  Galv's Message Background
#------------------------------------------------------------------------------#
#  For: RPGMAKER VX ACE
#  Version 1.3
#------------------------------------------------------------------------------#
#  2013-04-01 - version 1.2 - added option to disable script in battle
#  2013-02-10 - version 1.1 - dim and transparent settings work with image now
#  2012-12-02 - version 1.0 - release
#------------------------------------------------------------------------------#
#  This script displays an image file for a message background instead of using
#  the windowskin. If you are using Galv's Message Busts put this script ABOVE.
#
#  This image background will not stretch to fit, that's not it's purpose.
#  I encourage you to make your own message background images, the ones in the
#  demo are just quick examples!
#------------------------------------------------------------------------------#
#  INSTRUCTIONS:
#  Put in script list below Materials and above Main.
#
#  Read the instructions
#------------------------------------------------------------------------------#
#  SCRIPT CALL
#------------------------------------------------------------------------------#
#
#  msgbg("ImageName", y_offset)     # To change message background during game
#                                   # "ImageName" is the new file name to use
#                                   # y_offset is the new IMAGE_Y for that bg
#  EXAMPLE
#  msgbg("MsgImage", -98)     
#
#------------------------------------------------------------------------------#

($imported ||= {})["Galvs_Message_Background"] = true
module Galv_Msgbg

#------------------------------------------------------------------------------#
#  SCRIPT SETTINGS
#------------------------------------------------------------------------------#

  # DEFAULT MESSAGE #
   
  MESSAGE_IMAGE = "MsgImage"   # Name of image in /Graphics/System to use for
                               # the message background.

  IMAGE_Y = -98                # Y offset of image

  DISABLE_SWITCH = 1   # Turn swith ON to disable image background
   
  DISABLE_IN_BATTLE = true  # Disable this script when in battle.
   
   
#------------------------------------------------------------------------------#
#  END SCRIPT SETTINGS
#------------------------------------------------------------------------------#

end


class Window_Message < Window_Base
  alias galv_msgbg_window_create_back_bitmap create_back_bitmap
  def create_back_bitmap
    @bg ||= Sprite.new
    if !$game_message.message_bg.nil?
      @bg.bitmap = Cache.system($game_message.message_bg)
      @current_bg = $game_message.message_bg
    end
    @bg.z = z - 1
    @bg.opacity = 0
    galv_msgbg_window_create_back_bitmap
  end
   
  alias galv_msgbg_window_dispose dispose
  def dispose
    galv_msgbg_window_dispose
    dispose_msgbg if [email protected]?
  end
   
  def dispose_msgbg
    @bg.dispose
    @bg.bitmap.dispose
  end
   
  alias galv_msgbg_window_update_back_sprite update_back_sprite
  def update_back_sprite
    if !$game_switches[Galv_Msgbg::DISABLE_SWITCH] && !$game_temp.msg_off
      update_msgbg if openness > 0
      @bg.opacity = 0 if openness == 0
    else
      galv_msgbg_window_update_back_sprite
      @bg.opacity = 0
    end
    @bg.update
    @back_sprite.update
  end
   
  def update_msgbg
    if $game_message.message_bg != @current_bg
      if !$game_message.message_bg.nil?
        @bg.bitmap = Cache.system($game_message.message_bg)
        @current_bg = $game_message.message_bg
      end
    end
    @bg.y = self.y + $game_message.message_bg_y
    case @background
    when 0; @bg.opacity = openness
    when 1; @bg.opacity = openness * 0.5
    when 2; @bg.opacity = 0
    end
    @back_sprite.visible = false
    self.opacity = 0
  end

end # Window_Message < Window_Base

class Game_Message
  attr_accessor :message_bg
  attr_accessor :message_bg_y
   
  alias galv_msgbg_message_initialize initialize
  def initialize
    galv_msgbg_message_initialize
    @message_bg = Galv_Msgbg::MESSAGE_IMAGE
    @message_bg_y = Galv_Msgbg::IMAGE_Y
  end
end # Game_Message

class Game_Temp
  attr_accessor :msg_off
end # Game_Temp

class Scene_Battle < Scene_Base
  alias galv_msgbg_sb_start start
  def start
    $game_temp.msg_off = true if Galv_Msgbg::DISABLE_IN_BATTLE
    galv_msgbg_sb_start
  end

  alias galv_msgbg_sb_terminate terminate
  def terminate
    $game_temp.msg_off = nil
    galv_msgbg_sb_terminate
  end
end # Scene_Battle < Scene_Base

class Game_Interpreter
  def msgbg(image,y_offset)
    $game_message.message_bg = image
    $game_message.message_bg_y = y_offset
  end
end # Game_Interpreter
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-2-23 14:03

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表