江湖梦网游戏服务平台

 找回密码
 免费注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 2244|回复: 2

[搬运汉化] 在地图上按键切换领队(排队式)

[复制链接]

449

帖子

41

精华

25

贡献

江湖英豪

检察者

Rank: 5Rank: 5Rank: 5

积分
7217
发表于 2020-11-30 15:41 | 显示全部楼层 |阅读模式

马上注册,享用更多精彩。

您需要 登录 才可以下载或查看,没有帐号?免费注册

x
本帖最后由 大魔王 于 2020-11-30 15:46 编辑



如何判断 领队
$gameParty._actors是一个队伍序号数组,假如队伍只有三人,那么$gameParty._actors的值为[1,2,3],以此推类,注意不能发生数组越界。




  1. /**
  2. * Created by 夏末渐离 on 2015/12/24.
  3. */
  4. /*:@author XMJL
  5. * @plugindesc  Input Q to change leader .
  6. *
  7. */
  8. Game_Party.prototype.LeadMember=function()
  9. {
  10.     var First_Member =$gameParty._actors.shift();
  11.     $gameParty._actors.push(First_Member);
  12.     $gamePlayer.refresh();
  13. }
  14. var Scene_Update_20151224=Scene_Map.prototype.update;
  15. Scene_Map.prototype.update=function()
  16. {
  17.     Scene_Update_20151224.call(this);
  18.     if(Input.isTriggered('pageup'))
  19.     {
  20.         $gameParty.LeadMember();
  21.     }
  22. }
复制代码


082215jnu1uitwugtfzuz3.png
082219m1tyu7tut1kji5ip.jpg
082220kq80fncquogbgzgz.jpg
QQ群:135474765游戏群 [img]http://img2.17getfun.com/FhlesUf3VWxvhVFuc0qdBwYuanyt?imageMogr2/auto-orient/thumbnail/1080x%3E/format/jpg/

449

帖子

41

精华

25

贡献

江湖英豪

检察者

Rank: 5Rank: 5Rank: 5

积分
7217
 楼主| 发表于 2020-11-30 15:41 | 显示全部楼层


默认为Q键,替换方法:Input.isTriggered(以下任意键值)




  1. 'pageup',   // Q
  2. 'tab',       // tab
  3. 'ok',       // enter
  4. 'shift',    // shift
  5. 'control',  // control
  6. 'control',  // alt
  7. 'escape',   // escape
  8. 'ok',       // space
  9. 'pageup',   // pageup
  10. 'pagedown', // pagedown
  11. 'left',     // left arrow
  12. 'up',       // up arrow
  13. 'right',    // right arrow
  14. 'down',     // down arrow
  15. 'escape',   // insert
  16. 'pagedown', // W
  17. 'escape',   // X
  18. 'ok',       // Z
  19. 'escape',   // numpad 0
  20. 'down',     // numpad 2
  21. 'left',    // numpad 4
  22. 'right',   // numpad 6
  23. 'up',      // numpad 8
  24. 'debug'    // F9
复制代码







QQ群:135474765游戏群 [img]http://img2.17getfun.com/FhlesUf3VWxvhVFuc0qdBwYuanyt?imageMogr2/auto-orient/thumbnail/1080x%3E/format/jpg/

449

帖子

41

精华

25

贡献

江湖英豪

检察者

Rank: 5Rank: 5Rank: 5

积分
7217
 楼主| 发表于 2020-11-30 15:47 | 显示全部楼层
换领队插件加个开关


  1. {
  2.     Scene_Update_20151224.call(this);
  3.     if(Input.isTriggered('pagedown'))
  4.     {if($gameSwitches.value(22))
  5.         $gameParty.LeadMember();
  6.     }
  7. }
复制代码


QQ群:135474765游戏群 [img]http://img2.17getfun.com/FhlesUf3VWxvhVFuc0qdBwYuanyt?imageMogr2/auto-orient/thumbnail/1080x%3E/format/jpg/
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|手机版|Archiver|小黑屋|江湖梦网 ( 粤ICP备18126133号-1 )

GMT+8, 2024-4-26 15:36 , Processed in 0.228410 second(s), 28 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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