じ☆ve冰风 发表于 2026-7-10 18:05:11

Save/Load Menu on button press

Just a port of my VXACE Script

                Ruby:       
=begin=============================================================================== Save Menu on button press (by Zero_G) Version: RGSS===============================================================================   ==Description == This script will open the save/load window on a button press. More actions for buttons can be done.== Terms of Use == - Free for use in non-commercial projects with credits - Free for use in commercial projects - Please provide credits to Zero_G== Credits == -Script modified from "Button Common Events" (VXACE) by "Yanfly" == Changelog == v1.1 - Canceling load screen now returns to game instead of main menu== Usage == Just add the plugin before main.-------------------------------------------------------------------------------=endmodule ZERO    SAVE_KEY = Input::LLOAD = true    #Activate or deactivate load functionLOAD_KEY = Input::F9end# Change on_cancel behaviour of Scene_load so it returns to game instead of menuclass Scene_Titlealias zero_save_main maindef main    $load_from_key = false # Reset var when loading main menu    zero_save_mainendendclass Scene_Load < Scene_Filedef on_cancel    if ($load_from_key)      $game_system.se_play($data_system.cancel_se)      $scene = Scene_Map.new    else      $game_system.se_play($data_system.cancel_se)      $scene = Scene_Title.new    endendend# Call scene load and scene save when button is pressedclass Scene_Mapalias zero_update updatedef update    zero_update      if Input.trigger?(ZERO::SAVE_KEY)      call_save    end      if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD      $game_player.straighten      $load_from_key = true      $scene = Scene_Load.new    endendendclass Scene_Battlealias save_battle_update updatedef update    if Input.trigger?(ZERO::LOAD_KEY) && ZERO::LOAD      $game_player.straighten      $load_from_key = true      $scene = Scene_Load.new    end    save_battle_updateendend




本贴来自国际rpgmaker官方论坛作者:Zero_G处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/save-load-menu-on-button-press.127069/
页: [1]
查看完整版本: Save/Load Menu on button press