查看: 3798|回复: 8

[已经解决] 如何让人物死亡后回城复活

[复制链接]
梦石
0
星屑
50
在线时间
23 小时
注册时间
2010-10-21
回帖
5
发表于 2017-5-3 17:10:11 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
设置了半天还是死亡后直接出现END画面,求教如何搞
梦石
0
星屑
4716
在线时间
501 小时
注册时间
2013-12-7
回帖
333

极短28参与极短27参与

发表于 2017-5-3 20:14:05 | 显示全部楼层
  快下班了,占个坑。晚上回去有时间给你写。
回复

使用道具 举报

梦石
0
星屑
3662
在线时间
1133 小时
注册时间
2017-4-6
回帖
229

开拓者

发表于 2017-5-3 20:47:25 | 显示全部楼层
  1. // --------------------------------------
  2. // SOUL_MV_CathedralSystem.js
  3. // Author: Soulpour777
  4. // --------------------------------------
  5. /*:
  6. * @plugindesc siwanghouhuicheng
  7. * @
  8. *
  9. * @param Revival Map ID
  10. * @desc The map id of the map you will be revived at when you die.
  11. * @default 1
  12. *
  13. * @param Revival Map X
  14. * @desc The x coordinate of the actors when revived in the Revival Map.
  15. * @default 10
  16. *
  17. * @param Revival Map Y
  18. * @desc The y coordinate of the actors when revived in the Revival Map.
  19. * @default 12
  20. *
  21. * @param Revival Map Direction
  22. * @desc The direction faced by the actors when revived in the Revival Map.
  23. * @default 2
  24. *
  25. * @param Revival Map FadeType
  26. * @desc The fade type used when revived in the Revival Map.
  27. * @default 3
  28. *
  29. * @help

  30. =======================================
  31. Plugin Commands
  32. =======================================

  33. This is if you want to go directly to
  34. the cathedral even if you never died.
  35. This can be used both for debugging and
  36. eventing purposes.




  37. *
  38. */

  39. (function(){

  40.         var SOUL_MV = SOUL_MV || {};
  41.         SOUL_MV.CathedralRevival = SOUL_MV.CathedralRevival || {};

  42.         SOUL_MV.CathedralRevival.mapId = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map ID'] || 18);
  43.         SOUL_MV.CathedralRevival.x = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map X'] || 18);
  44.         SOUL_MV.CathedralRevival.y = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map Y'] || 12);
  45.         SOUL_MV.CathedralRevival.direction = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map Direction'] || 0);
  46.         SOUL_MV.CathedralRevival.fadeType = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map FadeType'] || 1);

  47.         SOUL_MV.CathedralRevival.pluginCommand = Game_Interpreter.prototype.pluginCommand;
  48.         Game_Interpreter.prototype.pluginCommand = function(command, args) {
  49.             SOUL_MV.CathedralRevival.pluginCommand.call(this, command, args);
  50.             if (command === 'SOUL_MV') {
  51.                     switch(args[0]) {
  52.                             case 'cathedral':
  53.                                     SceneManager.push(Scene_Cathedral);
  54.                                     break;
  55.                     }
  56.             }
  57.         };


  58.         function Scene_Cathedral() {
  59.             this.initialize.apply(this, arguments);
  60.         }

  61.         Scene_Cathedral.prototype = Object.create(Scene_Base.prototype);
  62.         Scene_Cathedral.prototype.constructor = Scene_Cathedral;

  63.         Scene_Cathedral.prototype.initialize = function() {
  64.             Scene_Base.prototype.initialize.call(this);
  65.         };

  66.         Scene_Cathedral.prototype.create = function() {
  67.             Scene_Base.prototype.create.call(this);
  68.         };

  69.         Scene_Cathedral.prototype.start = function() {
  70.             Scene_Base.prototype.start.call(this);
  71.             this.startFadeIn(this.slowFadeSpeed(), false);
  72.         };

  73.         Scene_Cathedral.prototype.update = function() {
  74.             Scene_Base.prototype.update.call(this);
  75.             
  76.             for (var i = 0; i < $gameParty.members().length; i++) {
  77.                     $gameParty.members()[i].recoverAll();
  78.             }
  79.             var mapId = SOUL_MV.CathedralRevival.mapId;
  80.             var x = SOUL_MV.CathedralRevival.x;
  81.             var y = SOUL_MV.CathedralRevival.y;
  82.             var direction = SOUL_MV.CathedralRevival.direction;
  83.             var fadeType = SOUL_MV.CathedralRevival.fadeType;

  84.             $gamePlayer.reserveTransfer(mapId, x, y, direction, fadeType);
  85.             SceneManager.goto(Scene_Map);
  86.         };

  87.         Scene_Cathedral.prototype.stop = function() {
  88.             Scene_Base.prototype.stop.call(this);
  89.         };

  90.         Scene_Cathedral.prototype.terminate = function() {
  91.             Scene_Base.prototype.terminate.call(this);
  92.             AudioManager.stopAll();
  93.         };
  94.        
  95.         Scene_Base.prototype.checkGameover = function() {
  96.             if ($gameParty.isAllDead()) {
  97.                 SceneManager.goto(Scene_Cathedral);
  98.             }
  99.         };       

  100.         Game_Party.prototype.isAllDead = function() {
  101.             if (Game_Unit.prototype.isAllDead.call(this)) {
  102.                     if (DataManager.isBattleTest()) {
  103.                             return !this.isEmpty();
  104.                     } else {
  105.                             SceneManager.push(Scene_Cathedral);
  106.                     }
  107.                 
  108.             } else {
  109.                 return false;
  110.             }
  111.         };       
  112. })();
复制代码

点评

脚本很全面,我就不写了。  发表于 2017-5-4 01:53
回复

使用道具 举报

梦石
0
星屑
50
在线时间
23 小时
注册时间
2010-10-21
回帖
5
 楼主| 发表于 2017-5-4 07:32:03 | 显示全部楼层
多谢哈,但是不会用脚本的蠢新,能不能给个简单点的方法或者具体怎么使用脚本的方法拜谢哈
回复

使用道具 举报

梦石
0
星屑
3662
在线时间
1133 小时
注册时间
2017-4-6
回帖
229

开拓者

发表于 2017-5-4 13:34:33 | 显示全部楼层
kyd9527 发表于 2017-5-4 07:32
多谢哈,但是不会用脚本的蠢新,能不能给个简单点的方法或者具体怎么使用脚本的方法拜谢哈 ...

把代码复制到txt,另存为SOUL_MV_CathedralSystem.js 放在plugins文件夹里,软件里添加相应插件就好了
回复

使用道具 举报

梦石
0
星屑
50
在线时间
50 小时
注册时间
2017-1-10
回帖
53
发表于 2017-5-4 14:23:11 | 显示全部楼层
不用上面的插件也行吧。
说下思路吧,失败之了后——转到添加图片——失败图片——比如一个坟墓的图。
然后等待60帧,跳转到目标选择就行了。
就是可失败的战斗条件,不知道能不能理解。
回复

使用道具 举报

梦石
0
星屑
50
在线时间
50 小时
注册时间
2017-1-10
回帖
53
发表于 2017-5-4 14:24:27 | 显示全部楼层
埋头farm 发表于 2017-5-4 14:23
不用上面的插件也行吧。
说下思路吧,失败之了后——转到添加图片——失败图片——比如一个坟墓的图。
然后 ...

莫名其妙最后一段话变了。可失败。
回复

使用道具 举报

梦石
0
星屑
50
在线时间
23 小时
注册时间
2010-10-21
回帖
5
 楼主| 发表于 2017-5-5 23:54:30 | 显示全部楼层
谢谢各位大佬哈~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部