[Thảo Luận] Hỏi về quay về title.

WuakaWuaka Posts: 293Registered
Chào mọi người, mọi người cho mình hỏi khi mình nhấn mở menu -> "Game End" -> "To Title" hoặc là bị Game Over, thì thay vì bị quay về title, có cách nào để mình cho trans player tới 1 map khác được không vậy.
Cám ơn mọi người trước.

Comments

  • TkTsTkTs Posts: 482Registered
    có script này nhé bạn, khi Game over thì bạn sẽ được phép load lại lần save cuối
    # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # [RGSS3] Gameover Commands
    # Author: Soulpour777
    # Version 1.0
    # Script Category: Custom Scenes
    # Description: Creates a command for you to continue or quit game on game over.
    # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # Instructions: Plug and Play. Place the script below Materials above Main.
    # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # Terms of Use
    # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    #~ For Non-Commercial Use:

    #~ You are free to use the script on any non-commercial projects.
    #~ You are free to adapt the script. Any modifications are allowed as long as
    #~ it is provided as a note on the script.
    #~ Credits to SoulPour777 for the script.
    #~ Preserve the Script Header.
    #~ Claiming the script as your own is prohibited.

    # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

    #==============================================================================
    # ** Gameover_Commands
    #
    # This module processes the Load and Quit functions.
    #==============================================================================
    module Gameover_Commands
    # Dialog for the Game Over's Help Menu
    Help_Window = "Bạn có muốn tiếp tục từ điểm lưu trữ cuối cùng không?"
    ContinueDialog = "Có chú"
    QuitDialog = "Thôi"

    #Load
    def self.process_load
    SceneManager.call(Scene_Load)
    end

    # Quit
    def self.process_quit
    SceneManager.goto(Scene_Title)
    end

    end

    #==============================================================================
    # ** Window_GameoverCommand
    #
    # This window is for selecting Continue or Quit from the Gameover Scene.
    #==============================================================================

    class Window_GameoverCommand < Window_Command
    #
    # * Object Initialization
    #
    def initialize
    super(0, 0)
    update_placement
    self.openness = 0
    open
    end
    #
    # * Get Window Width
    #
    def window_width
    return 160
    end
    #
    # * Update Window Position
    #
    def update_placement
    self.x = (Graphics.width - width) / 2
    self.y = (Graphics.height * 1.6 - height) / 2
    end

    def make_command_list
    add_command(Gameover_Commands::ContinueDialog, :yes)
    add_command(Gameover_Commands::QuitDialog, :no)
    end

    end


    #==============================================================================
    # ** Scene_Gameover
    #
    # This class performs game over screen processing.
    #==============================================================================

    class Scene_Gameover < Scene_Base
    #
    # * Start Processing
    #
    def start
    super
    play_gameover_music
    fadeout_frozen_graphics
    create_background
    @help_window = Window_Help.new
    create_commands
    @help_window.set_text(Gameover_Commands::Help_Window)
    end
    #
    # * Termination Processing
    #
    def terminate
    super
    dispose_background
    @command_window.dispose
    @help_window.dispose
    $scene = nil if $BTEST
    end

    def create_commands
    @command_window = Window_GameoverCommand.new
    @command_window.set_handler(:yes, method(:command_yes))
    @command_window.set_handler(:no, method(:command_no))
    end

    def command_yes
    Gameover_Commands.process_load
    end

    def command_no
    Gameover_Commands.process_quit
    end

    #
    # * Frame Update
    #
    def update
    super
    @help_window.update
    end

    end
  • WuakaWuaka Posts: 293Registered
    Cám ơn bạn.
    Nhưng mà nếu mình muốn quay về title khi đang chơi thì nó chuyển qua map khác, có cách nào làm không?
  • sanggameboysanggameboy Posts: 1,943Registered
    Khi game over thì đừng ấn vào nút Game Over Screen, mà hãy tạo một lệnh common event. Lúc đó muốn chuyển đi đâu cũng được :>
  • WuakaWuaka Posts: 293Registered
    Vậy nếu em muốn chạy common event đó ở "To Title" thì sao anh? ;; v ;;
  • sanggameboysanggameboy Posts: 1,943Registered
    Wuaka wrote:
    Vậy nếu em muốn chạy common event đó ở "To Title" thì sao anh? ;; v ;;

    Cái này phải động tới script  :shy:
  • WuakaWuaka Posts: 293Registered
    Script như thế nào anh? Anh có thể chỉ giúp em không? ;; v ;; Em cám ơn trước ạ.
  • sanggameboysanggameboy Posts: 1,943Registered
    Wuaka wrote:
    Script như thế nào anh? Anh có thể chỉ giúp em không? ;; v ;; Em cám ơn trước ạ.

    Ý tưởng là vào tìm đoạn To Title ở những script Scene_abc. Sau đó thêm lệnh chạy common event x khi kích hoạt lệnh To Title.
    Những cái này thì thường a làm theo kiểu vọc tùm lum này nọ, nên không thể hướng dẫn cụ thể, tại không nhớ lệnh :]]
  • WuakaWuaka Posts: 293Registered
    Lệnh chạy common event viết như thế nào vậy anh?.. ;; v ;;
Sign In or Register to comment.