设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
搜索附件  
同能RPG制作大师 › 附件中心 › 同能RM技术讨论区 › RPG Maker MV 讨论区 › Load last game after Game Over: Load last game after Game Over-1.png

Load last game after Game Over: Load last game after Game Over-1.png

 

Load last game after Game Over:

        ​



Load last save after Gameover
​



         
​



        This plugin is simple enough for anyone to understand, it just modifies the way the GameOver scene works.


        Originally when you lose you are sent to the title screen, I don't think that's something you really want for your game, I want my players to keep playing, so I'll save them the rage of reloading their save files.


        That's what this plugin does, it loads the last saved file by the player, not the file 99 or the most advanced, just the last save made, so they keep playing the game they were playing before the game over. And, if there's no saved game, it will send the player to the title screen just as before.


        Also, if you press enter, the save is loaded, but if the Cancel button is pressed, you're sent to the title screen.


        Don't need to credit, this is a very short plugin that anyone could have made.

                        /*:
                         * @plugindesc v1.01 Load last saved game after gameover.
                         * @author Torqus
                         * @help
                         * CHANGELOG
                         *    1.01 - Now the player can decide if he wants to continue or go to the title with Ok or Cancel keys
                         *
                         * Load last save after Gameover
                         *
                         * This plugin is simple enough for anyone to understand, it just modifies
                         * the way the GameOver scene works.
                         *
                         * Originally when you lose you are sent to the title screen, I don't think
                         * that's something you really want for your game, I want my players
                         * to keep playing, so I'll save them the rage of reloading their save files.
                         *
                         * That's what this plugin does, it loads the last saved file by the player,
                         * not the file 99 or the most advanced, just the last save made,
                         * so they keep playing the game they were playing before the game over.
                         * And, if there's no saved game, it will send the player to the title screen
                         * just as before.
                         *
                         * Also, if you press enter, the save is loaded, but if the Cancel button
                         * is pressed, you're sent to the title screen.
                         *
                         * Don't need to credit, this is a very short plugin that anyone could have made.
                         */


                        Scene_Gameover.prototype.update = function() {
                            if (this.isActive() && !this.isBusy() && this.isTriggered()) {
                                this.loadgame();
                            }
                            if (this.isActive() && !this.isBusy() && this.isBackTriggered()) {
                                this.gotoTitle();
                            }
                            Scene_Base.prototype.update.call(this);
                        };


                        Scene_Gameover.prototype.isTriggered = function() {
                            return Input.isTriggered('ok') || TouchInput.isTriggered();
                        };
                        Scene_Gameover.prototype.isBackTriggered = function() {
                            return Input.isRepeated('cancel') || TouchInput.isCancelled();
                        };


                        Scene_Gameover.prototype.loadgame = function() {
                            this.fadeOutAll();
                            if(DataManager.isAnySavefileExists()){
                                DataManager.loadGame(DataManager.latestSavefileId());
                                this.reloadMapIfUpdated();
                                $gameSystem.onAfterLoad();
                                SceneManager.goto(Scene_Map);
                            }
                            else{
                                SceneManager.goto(Scene_Title);
                            }
                        };


                        Scene_Gameover.prototype.gotoTitle = function() {
                            this.fadeOutAll();
                            SceneManager.goto(Scene_Title);
                        };


                        Scene_Gameover.prototype.reloadMapIfUpdated = function() {
                            $gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);
                            $gamePlayer.requestMapReload();
                        };               
Click to expand...


        MEGA download:


https://mega.nz/#!4MZDiZTD!JpMi1FUl8mb4q5Th4yUUMmy9HN48qpSOJ7F_DUdfFwU


CHANGELOG


        NEW 1.01 - Now players can decide if they want to continue with Ok or go to title with Cancel. I tested it and doesn't work with touch, working on it, but it takes time considering you have to build the apk and install it in the phone just to test it.


        Enjoy!


本贴来自国际rpgmaker官方论坛作者:Torqus处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/load-last-game-after-game-over.52077/
Load last game after Game Over: Load last game after Game Over-1.png
简体中文
繁體中文
English(英语)
日本語(日语)
Deutsch(德语)
Русский язык(俄语)
بالعربية(阿拉伯语)
Türkçe(土耳其语)
Português(葡萄牙语)
ภาษาไทย(泰国语)
한어(朝鲜语/韩语)
Français(法语)
关闭

幸运抽奖

社区每日抽奖来袭,快来试试你是欧皇还是非酋~

立即查看

Loading...

QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

GMT+8, 2026-10-24 21:39 , Processed in 0.072586 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部