设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2541|回复: 8
打印 上一主题 下一主题

[已经过期] 有没有办法把人物跟随和切换领队系统整合到一起

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
84 小时
注册时间
2013-4-19
帖子
35
跳转到指定楼层
1
发表于 2013-5-18 13:39:23 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 jinae 于 2013-5-18 15:58 编辑

现在站上的两个脚本——人物跟随和切换领队同时使用的话,有个问题总是很困扰人啊。比如说,将第二个角色切换到了领队位置,领头人的样子变成了第二个角色,可是后面跟着的还是第二个角色。看着太别扭了。

下面是两个脚本的内容
这个是自动跟随脚本
RUBY 代码复制
  1. # ————————————————————————————————————
  2.  
  3. # ▼▲▼ XRXS13. パーティ列車移動 ver.1.02 ▼▲▼
  4. # by fukuyama
  5.  
  6. #
  7. # Train_Actor
  8. #
  9. # [email][email protected][/email]
  10. # [url]http://www4.big.or.jp/~fukuyama/rgss/Train_Actor.txt[/url]
  11. #
  12.  
  13. module Train_Actor
  14.  
  15.  
  16.  
  17.  
  18. #是否使用停止跟随的方法,也就是说,这里false改为true的时候,如果TRANSPARENT_SWITCHES_INDEX
  19. #开关打开,跟随的人物就消失了(其实只是变成透明而已)
  20. TRANSPARENT_SWITCH = true
  21. TRANSPARENT_SWITCHES_INDEX = 20
  22. #举例:第一个为true,第二个为20,则打开20号开关,后面的人都没了。
  23.  
  24.  
  25.  
  26.  
  27.  
  28. #跟随人数的最大数目,可以更改为2、3什么的。
  29. TRAIN_ACTOR_SIZE_MAX = 4
  30.  
  31.  
  32.  
  33.  
  34.  
  35. # 定数
  36. #Input::DOWN = 2
  37. #Input::LEFT = 4
  38. #Input::RIGHT = 6
  39. #Input::UP = 6
  40. DOWN_LEFT = 1
  41. DOWN_RIGHT = 3
  42. UP_LEFT = 7
  43. UP_RIGHT = 9
  44. JUMP = 5
  45.  
  46. class Game_Party_Actor < Game_Character
  47. def initialize
  48. super()
  49. @through = true
  50. end
  51. def setup(actor)
  52. # キャラクターのファイル名と色相を設定
  53. if actor != nil
  54. @character_name = actor.character_name
  55. @character_hue = actor.character_hue
  56. else
  57. @character_name = ""
  58. @character_hue = 0
  59. end
  60. # 不透明度と合成方法を初期化
  61. [url=home.php?mod=space&uid=316553]@opacity[/url] = 255
  62. @blend_type = 0
  63. end
  64. def screen_z(height = 0)
  65. if $game_player.x == @x and $game_player.y == @y
  66. return $game_player.screen_z(height) - 1
  67. end
  68. super(height)
  69. end
  70. #--------------------------------------------------------------------------
  71. # ● 下に移動
  72. # turn_enabled : その場での向き変更を許可するフラグ
  73. #--------------------------------------------------------------------------
  74. def move_down(turn_enabled = true)
  75. # 下を向く
  76. if turn_enabled
  77. turn_down
  78. end
  79. # 通行可能な場合
  80. if passable?(@x, @y, Input::DOWN)
  81. # 下を向く
  82. turn_down
  83. # 座標を更新
  84. @y += 1
  85. end
  86. end
  87. #--------------------------------------------------------------------------
  88. # ● 左に移動
  89. # turn_enabled : その場での向き変更を許可するフラグ
  90. #--------------------------------------------------------------------------
  91. def move_left(turn_enabled = true)
  92. # 左を向く
  93. if turn_enabled
  94. turn_left
  95. end
  96. # 通行可能な場合
  97. if passable?(@x, @y, Input::LEFT)
  98. # 左を向く
  99. turn_left
  100. # 座標を更新
  101. @x -= 1
  102. end
  103. end
  104. #--------------------------------------------------------------------------
  105. # ● 右に移動
  106. # turn_enabled : その場での向き変更を許可するフラグ
  107. #--------------------------------------------------------------------------
  108. def move_right(turn_enabled = true)
  109. # 右を向く
  110. if turn_enabled
  111. turn_right
  112. end
  113. # 通行可能な場合
  114. if passable?(@x, @y, Input::RIGHT)
  115. # 右を向く
  116. turn_right
  117. # 座標を更新
  118. @x += 1
  119. end
  120. end
  121. #--------------------------------------------------------------------------
  122. # ● 上に移動
  123. # turn_enabled : その場での向き変更を許可するフラグ
  124. #--------------------------------------------------------------------------
  125. def move_up(turn_enabled = true)
  126. # 上を向く
  127. if turn_enabled
  128. turn_up
  129. end
  130. # 通行可能な場合
  131. if passable?(@x, @y, Input::UP)
  132. # 上を向く
  133. turn_up
  134. # 座標を更新
  135. @y -= 1
  136. end
  137. end
  138. #--------------------------------------------------------------------------
  139. # ● 左下に移動
  140. #--------------------------------------------------------------------------
  141. def move_lower_left
  142. # 向き固定でない場合
  143. unless @direction_fix
  144. # 右向きだった場合は左を、上向きだった場合は下を向く
  145. @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::UP ? Input::DOWN : @direction)
  146. end
  147. # 下→左、左→下 のどちらかのコースが通行可能な場合
  148. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::LEFT)) or
  149. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::DOWN))
  150. # 座標を更新
  151. @x -= 1
  152. @y += 1
  153. end
  154. end
  155. #--------------------------------------------------------------------------
  156. # ● 右下に移動
  157. #--------------------------------------------------------------------------
  158. def move_lower_right
  159. # 向き固定でない場合
  160. unless @direction_fix
  161. # 左向きだった場合は右を、上向きだった場合は下を向く
  162. @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::UP ? Input::DOWN : @direction)
  163. end
  164. # 下→右、右→下 のどちらかのコースが通行可能な場合
  165. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or
  166. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::DOWN))
  167. # 座標を更新
  168. @x += 1
  169. @y += 1
  170. end
  171. end
  172. #--------------------------------------------------------------------------
  173. # ● 左上に移動
  174. #--------------------------------------------------------------------------
  175. def move_upper_left
  176. # 向き固定でない場合
  177. unless @direction_fix
  178. # 右向きだった場合は左を、下向きだった場合は上を向く
  179. @direction = (@direction == Input::RIGHT ? Input::LEFT : @direction == Input::DOWN ? Input::UP : @direction)
  180. end
  181. # 上→左、左→上 のどちらかのコースが通行可能な場合
  182. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or
  183. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP))
  184. # 座標を更新
  185. @x -= 1
  186. @y -= 1
  187. end
  188. end
  189. #--------------------------------------------------------------------------
  190. # ● 右上に移動
  191. #--------------------------------------------------------------------------
  192. def move_upper_right
  193. # 向き固定でない場合
  194. unless @direction_fix
  195. # 左向きだった場合は右を、下向きだった場合は上を向く
  196. @direction = (@direction == Input::LEFT ? Input::RIGHT : @direction == Input::DOWN ? Input::UP : @direction)
  197. end
  198. # 上→右、右→上 のどちらかのコースが通行可能な場合
  199. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or
  200. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP))
  201. # 座標を更新
  202. @x += 1
  203. @y -= 1
  204. end
  205. end
  206. attr_writer :move_speed
  207. attr_writer :step_anime
  208. end
  209. module Spriteset_Map_Module
  210. def setup_actor_character_sprites?
  211. return @setup_actor_character_sprites_flag != nil
  212. end
  213. def setup_actor_character_sprites(characters)
  214. if !setup_actor_character_sprites?
  215. index_game_player = 0
  216. @character_sprites.each_index do |i|
  217. if @character_sprites[i].character.instance_of?(Game_Player)
  218. index_game_player = i
  219. break
  220. end
  221. end
  222. for character in characters.reverse
  223. @character_sprites.unshift(
  224. Sprite_Character.new(@viewport1, character)
  225. )
  226. end
  227. @setup_actor_character_sprites_flag = true
  228. end
  229. end
  230. end
  231. module Scene_Map_Module
  232. def setup_actor_character_sprites(characters)
  233. @spriteset.setup_actor_character_sprites(characters)
  234. end
  235. end
  236. module Game_Party_Module
  237. def set_transparent_actors(transparent)
  238. @transparent = transparent
  239. end
  240. def setup_actor_character_sprites
  241. if @characters == nil
  242. @characters = []
  243. for i in 1 ... TRAIN_ACTOR_SIZE_MAX
  244. @characters.push(Game_Party_Actor.new)
  245. end
  246. end
  247. for i in 1 ... TRAIN_ACTOR_SIZE_MAX
  248. @characters[i - 1].setup(actors[i])
  249. end
  250. if $scene.class.method_defined?('setup_actor_character_sprites')
  251. $scene.setup_actor_character_sprites(@characters)
  252. end
  253. end
  254. def update_party_actors
  255. setup_actor_character_sprites
  256. transparent = $game_player.transparent
  257. if transparent == false
  258. if TRANSPARENT_SWITCH
  259. transparent = $game_switches[TRANSPARENT_SWITCHES_INDEX]
  260. end
  261. end
  262. for character in @characters
  263. character.transparent = transparent
  264. character.move_speed = $game_player.move_speed
  265. character.step_anime = $game_player.step_anime
  266. character.update
  267. end
  268. end
  269. def moveto_party_actors( x, y )
  270. setup_actor_character_sprites
  271. for character in @characters
  272. character.moveto( x, y )
  273. end
  274. if @move_list == nil
  275. @move_list = []
  276. end
  277. move_list_setup
  278. end
  279. def move_party_actors
  280. if @move_list == nil
  281. @move_list = []
  282. move_list_setup
  283. end
  284. @move_list.each_index do |i|
  285. if @characters[i] != nil
  286. case @move_list[i].type
  287. when Input::DOWN
  288. @characters[i].move_down(@move_list[i].args[0])
  289. when Input::LEFT
  290. @characters[i].move_left(@move_list[i].args[0])
  291. when Input::RIGHT
  292. @characters[i].move_right(@move_list[i].args[0])
  293. when Input::UP
  294. @characters[i].move_up(@move_list[i].args[0])
  295. when DOWN_LEFT
  296. @characters[i].move_lower_left
  297. when DOWN_RIGHT
  298. @characters[i].move_lower_right
  299. when UP_LEFT
  300. @characters[i].move_upper_left
  301. when UP_RIGHT
  302. @characters[i].move_upper_right
  303. when JUMP
  304. @characters[i].jump(@move_list[i].args[0],@move_list[i].args[1])
  305. end
  306. end
  307. end
  308. end
  309. class Move_List_Element
  310. def initialize(type,args)
  311. @type = type
  312. @args = args
  313. end
  314. def type() return @type end
  315. def args() return @args end
  316. end
  317. def move_list_setup
  318. for i in 0 .. TRAIN_ACTOR_SIZE_MAX
  319. @move_list[i] = nil
  320. end
  321. end
  322. def add_move_list(type,*args)
  323. @move_list.unshift(Move_List_Element.new(type,args)).pop
  324. end
  325. def move_down_party_actors(turn_enabled = true)
  326. move_party_actors
  327. add_move_list(Input::DOWN,turn_enabled)
  328. end
  329. def move_left_party_actors(turn_enabled = true)
  330. move_party_actors
  331. add_move_list(Input::LEFT,turn_enabled)
  332. end
  333. def move_right_party_actors(turn_enabled = true)
  334. move_party_actors
  335. add_move_list(Input::RIGHT,turn_enabled)
  336. end
  337. def move_up_party_actors(turn_enabled = true)
  338. move_party_actors
  339. add_move_list(Input::UP,turn_enabled)
  340. end
  341. def move_lower_left_party_actors
  342. move_party_actors
  343. add_move_list(DOWN_LEFT)
  344. end
  345. def move_lower_right_party_actors
  346. move_party_actors
  347. add_move_list(DOWN_RIGHT)
  348. end
  349. def move_upper_left_party_actors
  350. move_party_actors
  351. add_move_list(UP_LEFT)
  352. end
  353. def move_upper_right_party_actors
  354. move_party_actors
  355. add_move_list(UP_RIGHT)
  356. end
  357. def jump_party_actors(x_plus, y_plus)
  358. move_party_actors
  359. add_move_list(JUMP,x_plus, y_plus)
  360. end
  361. end
  362. module Game_Player_Module
  363. def update
  364. $game_party.update_party_actors
  365. super
  366. end
  367. def moveto( x, y )
  368. $game_party.moveto_party_actors( x, y )
  369. super( x, y )
  370. end
  371. def move_down(turn_enabled = true)
  372. if passable?(@x, @y, Input::DOWN)
  373. $game_party.move_down_party_actors(turn_enabled)
  374. end
  375. super(turn_enabled)
  376. end
  377. def move_left(turn_enabled = true)
  378. if passable?(@x, @y, Input::LEFT)
  379. $game_party.move_left_party_actors(turn_enabled)
  380. end
  381. super(turn_enabled)
  382. end
  383. def move_right(turn_enabled = true)
  384. if passable?(@x, @y, Input::RIGHT)
  385. $game_party.move_right_party_actors(turn_enabled)
  386. end
  387. super(turn_enabled)
  388. end
  389. def move_up(turn_enabled = true)
  390. if passable?(@x, @y, Input::UP)
  391. $game_party.move_up_party_actors(turn_enabled)
  392. end
  393. super(turn_enabled)
  394. end
  395. def move_lower_left
  396. # 下→左、左→下 のどちらかのコースが通行可能な場合
  397. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::LEFT)) or
  398. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::DOWN))
  399. $game_party.move_lower_left_party_actors
  400. end
  401. super
  402. end
  403. def move_lower_right
  404. # 下→右、右→下 のどちらかのコースが通行可能な場合
  405. if (passable?(@x, @y, Input::DOWN) and passable?(@x, @y + 1, Input::RIGHT)) or
  406. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::DOWN))
  407. $game_party.move_lower_right_party_actors
  408. end
  409. super
  410. end
  411. def move_upper_left
  412. # 上→左、左→上 のどちらかのコースが通行可能な場合
  413. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::LEFT)) or
  414. (passable?(@x, @y, Input::LEFT) and passable?(@x - 1, @y, Input::UP))
  415. $game_party.move_upper_left_party_actors
  416. end
  417. super
  418. end
  419. def move_upper_right
  420. # 上→右、右→上 のどちらかのコースが通行可能な場合
  421. if (passable?(@x, @y, Input::UP) and passable?(@x, @y - 1, Input::RIGHT)) or
  422. (passable?(@x, @y, Input::RIGHT) and passable?(@x + 1, @y, Input::UP))
  423. $game_party.move_upper_right_party_actors
  424. end
  425. super
  426. end
  427. def jump(x_plus, y_plus)
  428. # 新しい座標を計算
  429. new_x = @x + x_plus
  430. new_y = @y + y_plus
  431. # 加算値が (0,0) の場合か、ジャンプ先が通行可能な場合
  432. if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0)
  433. $game_party.jump_party_actors(x_plus, y_plus)
  434. end
  435. super(x_plus, y_plus)
  436. end
  437. attr_reader :move_speed
  438. attr_reader :step_anime
  439. end
  440. end # module Train_Actor
  441. class Game_Party
  442. include Train_Actor::Game_Party_Module
  443. end
  444. class Game_Player
  445. include Train_Actor::Game_Player_Module
  446. end
  447. class Spriteset_Map
  448. include Train_Actor::Spriteset_Map_Module
  449. end
  450. class Scene_Map
  451. include Train_Actor::Scene_Map_Module
  452. end


这个是领队系统

RUBY 代码复制
  1. #==============================================================================
  2. # 领队更换系统 by SailCat
  3. #------------------------------------------------------------------------------
  4. # 添加此脚本后,在地图画面按下X键更换当前的领队。
  5. # 领队更改不会造成战斗队伍、菜单队伍次序的更改。
  6. # 若要在条件分歧中调用领队,请用脚本:$game_party.leader == 序号
  7. # 序号为0-3的值,最大不会超过队伍的角色数目减1。
  8. #==============================================================================
  9. class Game_Party
  10. #--------------------------------------------------------------------------
  11. # ● 追加实例变量
  12. #--------------------------------------------------------------------------
  13. attr_reader   :leader
  14. alias sailcat_initialize initialize
  15. alias sailcat_setup_starting_members setup_starting_members
  16. #--------------------------------------------------------------------------
  17. # ● 初始化对像
  18. #--------------------------------------------------------------------------
  19. def initialize
  20.    # 生成领队
  21.    @leader = 0
  22.    sailcat_initialize
  23. end
  24. #--------------------------------------------------------------------------
  25. # ● 设置初期同伴
  26. #--------------------------------------------------------------------------
  27. def setup_starting_members
  28.    sailcat_setup_starting_members
  29.    # 生成领队
  30.    @leader = 0
  31. end
  32. #--------------------------------------------------------------------------
  33. # ● 设置领队
  34. #--------------------------------------------------------------------------
  35. def switch_leader
  36.    @leader += 1
  37.    @leader %= @actors.size
  38. end
  39. end
  40. class Game_Player
  41. alias sailcat_update update
  42. #--------------------------------------------------------------------------
  43. # ● 刷新
  44. #--------------------------------------------------------------------------
  45. def refresh
  46.    # 同伴人数为 0 的情况下
  47.    if $game_party.actors.size == 0
  48.      # 清除角色的文件名及对像
  49.      @character_name = ""
  50.      @character_hue = 0
  51.      # 分支结束
  52.      return
  53.    end
  54.    # 获取带头的角色
  55.    actor = $game_party.actors[$game_party.leader]
  56.    # 设置角色的文件名及对像
  57.    @character_name = actor.character_name
  58.    @character_hue = actor.character_hue
  59.    # 初始化不透明度和合成方式
  60.    [url=home.php?mod=space&uid=316553]@opacity[/url] = 255
  61.    @blend_type = 0
  62. end
  63. #--------------------------------------------------------------------------
  64. # ● 画面更新
  65. #--------------------------------------------------------------------------
  66. def update
  67.    # 按下 A 键的情况下
  68.    if Input.trigger?(Input::A)
  69.      # 更换领队
  70.      $game_party.switch_leader
  71.      refresh
  72.    end
  73.    sailcat_update
  74. end
  75. end

  

Lv3.寻梦者

梦石
0
星屑
2602
在线时间
1967 小时
注册时间
2012-4-25
帖子
141
来自 4楼
发表于 2013-5-18 19:59:10 | 只看该作者
本帖最后由 乱糟糟 于 2013-5-18 20:02 编辑

RUBY 代码复制
  1. #==============================================================================
  2. # 领队更换系统 by SailCat
  3. #------------------------------------------------------------------------------
  4. # 添加此脚本后,在地图画面按下X键更换当前的领队。
  5. # 领队更改不会造成战斗队伍、菜单队伍次序的更改。
  6. # 若要在条件分歧中调用领队,请用脚本:$game_party.leader == 序号
  7. # 序号为0-3的值,最大不会超过队伍的角色数目减1。
  8. #==============================================================================
  9. class Game_Party
  10. #--------------------------------------------------------------------------
  11. # ● 追加实例变量
  12. #--------------------------------------------------------------------------
  13. attr_reader   :leader
  14. alias sailcat_initialize initialize
  15. alias sailcat_setup_starting_members setup_starting_members
  16. #--------------------------------------------------------------------------
  17. # ● 初始化对像
  18. #--------------------------------------------------------------------------
  19. def initialize
  20.    # 生成领队
  21.    @leader = 0
  22.    sailcat_initialize
  23. end
  24. #--------------------------------------------------------------------------
  25. # ● 设置初期同伴
  26. #--------------------------------------------------------------------------
  27. def setup_starting_members
  28.    sailcat_setup_starting_members
  29.    # 生成领队
  30.    @leader = 0
  31. end
  32. #--------------------------------------------------------------------------
  33. # ● 设置领队
  34. #--------------------------------------------------------------------------
  35. def switch_leader
  36.    # @leader += 1
  37.    # @leader %= @actors.size
  38.     id = $game_party.actors[0].id
  39.     $game_party.remove_actor(id)
  40.     $game_party.add_actor(id)
  41. end
  42. end
  43. class Game_Player
  44. alias sailcat_update update
  45. #--------------------------------------------------------------------------
  46. # ● 刷新
  47. #--------------------------------------------------------------------------
  48. def refresh
  49.    # 同伴人数为 0 的情况下
  50.    if $game_party.actors.size == 0
  51.      # 清除角色的文件名及对像
  52.      @character_name = ""
  53.      @character_hue = 0
  54.      # 分支结束
  55.      return
  56.    end
  57.    # 获取带头的角色
  58.    #actor = $game_party.actors[$game_party.leader]
  59.    actor = $game_party.actors[0]
  60.    # 设置角色的文件名及对像
  61.    @character_name = actor.character_name
  62.    @character_hue = actor.character_hue
  63.    # 初始化不透明度和合成方式
  64.    @blend_type = 0
  65. end
  66. #--------------------------------------------------------------------------
  67. # ● 画面更新
  68. #--------------------------------------------------------------------------
  69. def update
  70.    # 按下 A 键的情况下
  71.    if Input.trigger?(Input::A)
  72.      # 更换领队
  73.      $game_party.switch_leader
  74.      refresh
  75.    end
  76.    sailcat_update
  77. end
  78. end


领头替换脚本改成这个
原理是:如果你使用事件把人物离队然后加入此人物,那么他就被放在队列最后一个,把这个和动力火车系统直接合一起就可以实现了……不知道会不会和你的什么脚本冲突。、

点评

感谢啊!可以用的。这个问题终于解决了,太感谢了。  发表于 2013-5-18 21:10

评分

参与人数 1梦石 +1 收起 理由
hys111111 + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
60
在线时间
568 小时
注册时间
2012-9-7
帖子
611
2
发表于 2013-5-18 14:49:50 | 只看该作者
  1. # ▼▲▼ XRXS26. 人物扩张系统 ver..05 ▼▲▼
  2. # by 桜雅 在土

  3. #==============================================================================
  4. # □ 初始化定义
  5. #==============================================================================
  6. module XRXS26
  7.   FRONT_MEMBER_LIMIT    = 4        # 战斗参战人数最大值
  8.   BACKWARD_MEMBER_LIMIT = 6       # 待机人数最大值  
  9.   BACKWARD_EXP_GAINABLE = true     # 待机人物是否获得经验
  10.   MENU_STATUS_STRETCH   = false    # 3人以下的时候,菜单是否拉伸大小
  11. end
  12. #------------------------------------------------------------------------------
  13. # 菜单页面状态
  14. #------------------------------------------------------------------------------
  15. class Window_MenuStatus < Window_Selectable
  16.   # 列数
  17.   COLUMN_MAX = 1
  18.   # 光标高度
  19.   CURSOR_HEIGHT = 96
  20.   # 一行的高度
  21.   LINE_HEIGHT = 116
  22. end
  23. #------------------------------------------------------------------------------
  24. # 菜??景
  25. #------------------------------------------------------------------------------
  26. class Scene_Menu
  27.   MENU_MEMBER_CHANGE_KEY_GO    = Input::RIGHT # 进入键
  28.   MENU_MEMBER_CHANGE_KEY_END   = Input::LEFT  # 离开键
  29.   MENU_MEMBER_CHANGE_INDEX_MIN = 0            # 可更换角色最小编号
  30.   FORCETOBATTLE_ACTORS         = []           # 不能待机的角色编号
  31.   UMBATTLABLE_ACTORS           = []           # 不能加入战斗的角色编号
  32.   UNMOVABLE_ACTORS             = []           # 不能移动的角色编号
  33. end
  34. #------------------------------------------------------------------------------
  35. #
  36. # 解説
  37. #   Game_Partyの @actors のうち先頭から↑FRONT_MEMBER_LIMIT番目までのアクターを
  38. #   戦闘メンバーとして、それ以上を待機メンバーとして扱います。
  39. #
  40. #==============================================================================
  41. # ■ Game_Party
  42. #==============================================================================
  43. class Game_Party
  44.   #--------------------------------------------------------------------------
  45.   # ○ インクルード
  46.   #--------------------------------------------------------------------------
  47.   include XRXS26
  48.   #--------------------------------------------------------------------------
  49.   # ○ 公開インスタンス変数
  50.   #--------------------------------------------------------------------------
  51.   attr_reader   :backword_actors          # 待機アクター
  52.   #--------------------------------------------------------------------------
  53.   # ● オブジェクト初期化
  54.   #--------------------------------------------------------------------------
  55.   alias xrxs26_initialize initialize
  56.   def initialize
  57.     xrxs26_initialize
  58.     # 待機メンバー配列を初期化
  59.     @backword_actors = []
  60.   end
  61.   #--------------------------------------------------------------------------
  62.   # ● アクターを加える
  63.   #--------------------------------------------------------------------------
  64.   def add_actor(actor_id)
  65.     # アクターを取得
  66.     actor = $game_actors[actor_id]
  67.     # このアクターがパーティにいない場合
  68.     if not @actors.include?(actor)
  69.       # 満員でないならメンバーに追加
  70.       if @actors.size < (FRONT_MEMBER_LIMIT + BACKWARD_MEMBER_LIMIT)
  71.         # # アクターを追加
  72.         @actors.push(actor)
  73.         # プレイヤーをリフレッシュ
  74.         $game_player.refresh
  75.       end
  76.     end
  77.   end
  78. end
  79. #==============================================================================
  80. # ■ Spriteset_Battle
  81. #==============================================================================
  82. class Spriteset_Battle
  83.   #--------------------------------------------------------------------------
  84.   # ● インクルード
  85.   #--------------------------------------------------------------------------
  86.   include XRXS26
  87.   #--------------------------------------------------------------------------
  88.   # ● フレーム更新
  89.   #--------------------------------------------------------------------------
  90.   alias xrxs26_initialize initialize
  91.   def initialize
  92.     xrxs26_initialize
  93.     #
  94.     # 以下、五人目以降のアクタースプライトの追加処理---
  95.     #
  96.     # アクターが表示されるビューポートを、とりあえず先頭の人から取得しとく(素
  97.     actor_viewport = @actor_sprites[0].viewport
  98.     # 戦闘参加メンバーが5人以上の場合
  99.     if FRONT_MEMBER_LIMIT > 4
  100.       for i in 5..FRONT_MEMBER_LIMIT
  101.         # アクタースプライトを追加
  102.         @actor_sprites.push(Sprite_Battler.new(actor_viewport))
  103.         @actor_sprites[i-1].battler = $game_party.actors[i-1]
  104.       end
  105.     end
  106.     # ビューポートを更新
  107.     actor_viewport.update
  108.   end
  109. end
  110. #==============================================================================
  111. # ■ Scene_Battle
  112. #==============================================================================
  113. class Scene_Battle
  114.   #--------------------------------------------------------------------------
  115.   # ● インクルード
  116.   #--------------------------------------------------------------------------
  117.   include XRXS26
  118.   #--------------------------------------------------------------------------
  119.   # ● メイン処理 をパーティメンバー処理ではさむ
  120.   #--------------------------------------------------------------------------
  121.   alias xrxs26_main main
  122.   def main
  123.     # 待機メンバーへ退避----------
  124.     $game_party.backword_actors[0,0] = $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT]
  125.     $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  126.     $game_party.actors.compact!
  127.     # メイン処理
  128.     xrxs26_main
  129.     # 待機メンバーから復帰
  130.     $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  131.     $game_party.backword_actors.clear
  132.   end
  133.   #--------------------------------------------------------------------------
  134.   # ● アフターバトルフェーズ開始
  135.   #--------------------------------------------------------------------------
  136.   alias xrxs26_start_phase5 start_phase5
  137.   def start_phase5
  138.     # 「待機メンバー経験値獲得」が有効 and 待機アクターが一人以上いる
  139.     if BACKWARD_EXP_GAINABLE and $game_party.backword_actors.size >= 1
  140.       # 待機メンバーから復帰
  141.       $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  142.       $game_party.backword_actors.clear
  143.       # 呼び戻す
  144.       xrxs26_start_phase5
  145.       # 待機メンバーへ退避----------
  146.       $game_party.backword_actors[0,0] = $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT]
  147.       $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  148.       $game_party.actors.compact!
  149.     else
  150.       # 呼び戻す
  151.       xrxs26_start_phase5
  152.     end
  153.   end
  154. end
  155. # ▽△▽ XRXL 4. 第二カーソル 機構 ▽△▽
  156. # by 桜雅 在土
  157. #==============================================================================
  158. # --- XRXS. 第二カーソル 機構 ---
  159. #------------------------------------------------------------------------------
  160. #     ウィンドウに .index2 プロパティを追加します。
  161. #==============================================================================
  162. module XRXS_Cursor2
  163.   #--------------------------------------------------------------------------
  164.   # ● オブジェクト初期化
  165.   #--------------------------------------------------------------------------
  166.   def initialize(x, y, w, h)
  167.     super(x, y, h, w)
  168.     # 補助ウィンドウ(透明)を作成:カーソル専用
  169.     @xrxsc2_window = Window_Selectable.new(self.x, self.y, self.width, self.height)
  170.     @xrxsc2_window.opacity = 0
  171.     @xrxsc2_window.active = false
  172.     @xrxsc2_window.index = -1
  173.   end
  174.   #--------------------------------------------------------------------------
  175.   # ○ 第二カーソルの設置
  176.   #--------------------------------------------------------------------------
  177.   def index2
  178.     return @xrxsc2_window.index
  179.   end
  180.   def index2=(index)
  181.     @xrxsc2_window.index = index
  182.     if index == -1
  183.       @xrxsc2_window.cursor_rect.empty
  184.     else
  185.       @xrxsc2_window.x = self.x
  186.       @xrxsc2_window.y = self.y
  187.       @xrxsc2_window.cursor_rect = self.cursor_rect
  188.     end
  189.   end
  190.   #--------------------------------------------------------------------------
  191.   # ○ 先頭の行の設定
  192.   #--------------------------------------------------------------------------
  193.   def top_row=(row)
  194.     super
  195.     # 補助ウィンドウの oy を更新
  196.     pre_oy = @xrxsc2_window.oy
  197.     @xrxsc2_window.oy = self.oy
  198.     @xrxsc2_window.cursor_rect.y -= self.oy - pre_oy
  199.   end
  200.   #--------------------------------------------------------------------------
  201.   # ○ 解放
  202.   #--------------------------------------------------------------------------
  203.   def dispose
  204.     @xrxsc2_window.dispose
  205.     super
  206.   end
  207.   #--------------------------------------------------------------------------
  208.   # ○ X, Y 座標
  209.   #--------------------------------------------------------------------------
  210.   def x=(n)
  211.     super
  212.     @xrxsc2_window.x = self.x unless @xrxsc2_window.nil?
  213.   end
  214.   def y=(n)
  215.     super
  216.     @xrxsc2_window.y = self.y unless @xrxsc2_window.nil?
  217.   end
  218. end
  219. # ▼▲▼ XRXS26AX. +入れ替えメニュー ver.2 ▼▲▼ built 081113
  220. # by 桜雅 在土

  221. #==============================================================================
  222. # ■ Window_MenuStatus
  223. #==============================================================================
  224. class Window_MenuStatus < Window_Selectable
  225.   #--------------------------------------------------------------------------
  226.   # ○ インクルード
  227.   #--------------------------------------------------------------------------
  228.   include XRXS26
  229.   include XRXS_Cursor2
  230.   #--------------------------------------------------------------------------
  231.   # ● 公開インスタンス変数
  232.   #--------------------------------------------------------------------------
  233.   attr_reader   :column_max             # 列数
  234.   #--------------------------------------------------------------------------
  235.   # ● オブジェクト初期化
  236.   #--------------------------------------------------------------------------
  237.   def initialize
  238.     h = 480
  239.     if MENU_STATUS_STRETCH
  240.       h = FRONT_MEMBER_LIMIT * 116 + 16
  241.     end
  242.     super(0, 0, 480, h)
  243.     h = ($game_party.actors.size - 1) * LINE_HEIGHT + CURSOR_HEIGHT
  244.     self.contents = Bitmap.new(width - 32, h)
  245.     refresh
  246.     self.active = false
  247.     self.index = -1
  248.   end
  249.   #--------------------------------------------------------------------------
  250.   # ○ 1 ページに表示できる行数の取得
  251.   #--------------------------------------------------------------------------
  252.   def page_row_max
  253.     if MENU_STATUS_STRETCH
  254.       return FRONT_MEMBER_LIMIT          # 戦闘パーティ最大数
  255.     else
  256.       return [FRONT_MEMBER_LIMIT, 4].max # 戦闘パーティ最大数(最低4)
  257.     end
  258.   end
  259.   #--------------------------------------------------------------------------
  260.   # ○ 先頭の行の取得
  261.   #--------------------------------------------------------------------------
  262.   def top_row
  263.     # ウィンドウ内容の転送元 Y 座標を、1 行の高さ LINE_HEIGHT で割る
  264.     return self.oy / LINE_HEIGHT
  265.   end
  266.   #--------------------------------------------------------------------------
  267.   # ○ 先頭の行の設定
  268.   #--------------------------------------------------------------------------
  269.   def top_row=(row)
  270.     super
  271.     self.oy = self.oy/32 * LINE_HEIGHT
  272.   end
  273.   #--------------------------------------------------------------------------
  274.   # ● カーソルの矩形更新
  275.   #--------------------------------------------------------------------------
  276.   def update_cursor_rect
  277.     super
  278.     unless @index < 0
  279.       y = (self.cursor_rect.y + self.oy) * LINE_HEIGHT/32 - self.oy
  280.       self.cursor_rect.set(0, y, self.cursor_rect.width, CURSOR_HEIGHT)
  281.     end
  282.   end
  283. end
  284. #==============================================================================
  285. # ■ Scene_Menu
  286. #==============================================================================
  287. class Scene_Menu
  288.   #--------------------------------------------------------------------------
  289.   # ○ インクルード
  290.   #--------------------------------------------------------------------------
  291.   include XRXS26
  292.   #--------------------------------------------------------------------------
  293.   # ● フレーム更新
  294.   #--------------------------------------------------------------------------
  295.   alias xrxs26ax_update update
  296.   def update
  297.     # インデックスを保存
  298.     @status_index = @status_window.index
  299.     # 呼び戻す
  300.     xrxs26ax_update
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  304.   #--------------------------------------------------------------------------
  305.   alias xrxs26ax_update_command update_command
  306.   def update_command
  307.     # 呼び戻す
  308.     xrxs26ax_update_command
  309.     # 入れ替え移行キーが押されたとき、@command_window.indexが設定値以上
  310.     if Input.trigger?(MENU_MEMBER_CHANGE_KEY_GO) and
  311.        @command_window.index >= MENU_MEMBER_CHANGE_INDEX_MIN
  312.       # 決定 SE を演奏
  313.       $game_system.se_play($data_system.decision_se)
  314.       # カーソル位置を記憶
  315.       @command_index_before_menu_member_change = @command_window.index
  316.       # 入れ替えウィンドウへ移行
  317.       @command_window.active = false
  318.       @command_window.index = -1
  319.       @status_window.active = true
  320.       @status_window.index = 0
  321.     end
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  325.   #--------------------------------------------------------------------------
  326.   alias xrxs26ax_update_status update_status
  327.   def update_status
  328.     # 呼び戻す
  329.     if @command_window.index != -1
  330.       xrxs26ax_update_status
  331.       return
  332.     end
  333.     # B ボタンか入れ替え終了キーが押されたとき
  334.     if ((Input.trigger?(Input::B) or Input.trigger?(MENU_MEMBER_CHANGE_KEY_END)) and
  335.         @status_window.index2 == -1 and
  336.         @status_index%@status_window.column_max == 0)
  337.       # キャンセル SE を演奏
  338.       $game_system.se_play($data_system.cancel_se)
  339.       # コマンドウィンドウをアクティブにする
  340.       @command_window.active = true
  341.       @command_window.index = 0
  342.       @status_window.active = false
  343.       @status_window.index = -1
  344.       return
  345.     end
  346.     # B ボタンが押されたとき
  347.     if Input.trigger?(Input::B) and @status_window.index2 >= 0
  348.       @status_window.index = @status_window.index2
  349.       @status_window.index2 = -1
  350.       return
  351.     end
  352.     # 決定キーが押されたとき
  353.     if Input.trigger?(Input::C)
  354.       if @status_window.index2 == -1
  355.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  356.           # ブザー SE を演奏
  357.           $game_system.se_play($data_system.buzzer_se)
  358.           return
  359.         end
  360.         # 決定 SE を演奏
  361.         $game_system.se_play($data_system.decision_se)
  362.         # メンバーの入れ替え一人目の決定
  363.         @status_window.index2 = @status_window.index
  364.       else
  365.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  366.           # ブザー SE を演奏
  367.           $game_system.se_play($data_system.buzzer_se)
  368.           return
  369.         end
  370.         # どちらかが戦闘メンバー かつ どちらかが戦闘禁止アクター の場合
  371.         if (@status_window.index < FRONT_MEMBER_LIMIT or
  372.             @status_window.index2 < FRONT_MEMBER_LIMIT) and
  373.            (UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  374.             UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  375.           # ブザー SE を演奏
  376.           $game_system.se_play($data_system.buzzer_se)
  377.           return
  378.         end
  379.         # どちらかが待機メンバー かつ どちらかが待機禁止アクター の場合
  380.         if (@status_window.index >= FRONT_MEMBER_LIMIT or
  381.             @status_window.index2 >= FRONT_MEMBER_LIMIT) and
  382.            (FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  383.             FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  384.           # ブザー SE を演奏
  385.           $game_system.se_play($data_system.buzzer_se)
  386.           return
  387.         end
  388.         # 決定 SE を演奏
  389.         $game_system.se_play($data_system.decision_se)
  390.         # メンバーの入れ替え二人目の決定と入れ替えの実行
  391.         actor2 = $game_party.actors[@status_window.index]
  392.         actor = $game_party.actors[@status_window.index2]
  393.         $game_party.actors[@status_window.index2] = actor2
  394.         $game_party.actors[@status_window.index] = actor
  395.         @status_window.index = @status_window.index2
  396.         @status_window.index2 = -1
  397.         # プレイヤーをリフレッシュ
  398.         $game_player.refresh
  399.         # ステータスウィンドウをリフレッシュ
  400.         @status_window.refresh
  401.       end
  402.       return
  403.     end
  404.   end
  405. end

  406. #============================================================================================
  407. # 本脚本来自www.66RPG.com,转载和使用请保留此信息
  408. #============================================================================================

  409. # ▼▲▼ XRXS26BX. +BUZZデザイン ▼▲▼ built 033109
  410. # by 桜雅 在土

  411. #==============================================================================
  412. # □ 初始化定义
  413. #==============================================================================
  414. class Window_MenuStatus < Window_Selectable
  415.   #
  416.   # 不显示能力值的角色编号
  417.   #
  418.   NO_PARAMETER_ACTORS = []
  419. end
  420. #==============================================================================
  421. # ■ Window_MenuStatus
  422. #==============================================================================
  423. class Window_MenuStatus < Window_Selectable
  424.   #--------------------------------------------------------------------------
  425.   # ○ インクルード
  426.   #--------------------------------------------------------------------------
  427.   include XRXS26
  428.   #--------------------------------------------------------------------------
  429.   # ● 公開インスタンス変数
  430.   #--------------------------------------------------------------------------
  431.   attr_reader   :newitem_window
  432.   attr_reader   :bottomkeyhelp_window
  433.   #--------------------------------------------------------------------------
  434.   # ● オブジェクト初期化
  435.   #--------------------------------------------------------------------------
  436.   alias xrxs26bx_initialize initialize
  437.   def initialize
  438.     # 呼び戻す
  439.     xrxs26bx_initialize
  440.     # 寄生してウィンドウを作成
  441.     # ボトルキーヘルプウィンドウ
  442.     @bottomkeyhelp_window = Window_BottomKeyHelp.new
  443.     @bottomkeyhelp_window.visible = false
  444.     # 設定変更
  445.     self.height   = 480#448
  446.     self.contents = Bitmap.new(width - 32, height - 32)
  447.     refresh
  448.   end
  449.   #--------------------------------------------------------------------------
  450.   # ● リフレッシュ
  451.   #--------------------------------------------------------------------------
  452.   def refresh
  453.     self.contents.clear
  454.     @item_max = $game_party.actors.size
  455.     @column_max = 2
  456.     y = (FRONT_MEMBER_LIMIT+1)/2 * 64 + 28
  457.     self.contents.font.size = 16
  458.     self.contents.font.color = system_color
  459.     self.contents.draw_text(4, 0, 92, 28, "战斗人物:")
  460.     self.contents.draw_text(4, 175, 92, 28, "待机人物:")
  461.     for i in 0...$game_party.actors.size
  462.       x = 64 + i%2 * 224
  463.       y = i/2 *  72 + 24
  464.       actor = $game_party.actors[i]
  465.       if i >= FRONT_MEMBER_LIMIT
  466.         y += 32
  467.         self.contents.font.color = disabled_color
  468.         self.contents.draw_text(x, y, 120, 32, actor.name)
  469.       else
  470.         draw_actor_name(actor   , x     , y     )
  471.       end
  472.       draw_actor_graphic(actor, x - 40, y + 64)
  473.       unless NO_PARAMETER_ACTORS.include?(actor.id)
  474.         draw_actor_level(actor  , x + 94, y     )
  475.         draw_actor_hp(actor     , x, y + 16)
  476.         draw_actor_sp(actor     , x, y + 32)
  477.         draw_actor_state(actor  , x, y + 48)
  478.       end
  479.     end
  480.   end
  481.   #--------------------------------------------------------------------------
  482.   # ○ フレーム更新
  483.   #--------------------------------------------------------------------------
  484.   def update
  485.     # ウィンドウを更新
  486.     @bottomkeyhelp_window.update
  487.     super
  488.   end
  489.   #--------------------------------------------------------------------------
  490.   # ○ 解放
  491.   #--------------------------------------------------------------------------
  492.   def dispose
  493.     @bottomkeyhelp_window.dispose
  494.     super
  495.   end
  496.   #--------------------------------------------------------------------------
  497.   # ● カーソルの矩形更新
  498.   #--------------------------------------------------------------------------
  499.   def update_cursor_rect
  500.     if @index < 0
  501.       self.cursor_rect.empty
  502.     else
  503.       y = @index/2 * 72 + 28
  504.       if @index >= FRONT_MEMBER_LIMIT
  505.         y += 32
  506.       end
  507.       self.cursor_rect.set(@index%2 * 224, y, 224, 72)
  508.     end
  509.   end
  510. end
  511. #==============================================================================
  512. # ■ Scene_Menu
  513. #==============================================================================
  514. class Scene_Menu
  515.   #--------------------------------------------------------------------------
  516.   # ● フレーム更新
  517.   #--------------------------------------------------------------------------
  518.   alias xrxs26bx_update update
  519.   def update
  520.     # 登録
  521.     if @bottomkeyhelp_window.nil?
  522.       @bottomkeyhelp_window = @status_window.bottomkeyhelp_window
  523.       @bottomkeyhelp_window.visible = true
  524.       set_keyhelp1
  525.     end
  526.     # 呼び戻す
  527.     xrxs26bx_update
  528.   end
  529.   #--------------------------------------------------------------------------
  530.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  531.   #--------------------------------------------------------------------------
  532.   alias xrxs26bx_update_command update_command
  533.   def update_command
  534.     # 呼び戻す
  535.     xrxs26bx_update_command
  536.     # 入れ替え移行キーが押されたとき
  537.     if @command_window.index == -1 and @status_window.active
  538.       set_keyhelp2
  539.     end
  540.   end
  541.   #--------------------------------------------------------------------------
  542.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  543.   #--------------------------------------------------------------------------
  544.   alias xrxs26bx_update_status update_status
  545.   def update_status
  546.     # 保存
  547.     last_index = @status_window.index2
  548.     # 呼び戻す
  549.     xrxs26bx_update_status
  550.     #
  551.     if last_index != @status_window.index2
  552.       # 一人目を選択した場合
  553.       if @status_window.index2 >= 0
  554.         set_keyhelp3
  555.       else
  556.         set_keyhelp2
  557.       end
  558.     end
  559.     # 戻った場合
  560.     unless @status_window.active
  561.       set_keyhelp1
  562.     end
  563.   end
  564.   #--------------------------------------------------------------------------
  565.   # ○ キーヘルプを設定 1
  566.   #--------------------------------------------------------------------------
  567.   def set_keyhelp1
  568.     @bottomkeyhelp_window.clear
  569.     @bottomkeyhelp_window.add("B","关闭本窗口")
  570.     @bottomkeyhelp_window.add("C","确定")
  571.     @bottomkeyhelp_window.add("→","人物顺序调整")
  572.   end
  573.   #--------------------------------------------------------------------------
  574.   # ○ キーヘルプを設定 2
  575.   #--------------------------------------------------------------------------
  576.   def set_keyhelp2
  577.     @bottomkeyhelp_window.clear
  578.     @bottomkeyhelp_window.add("←,B","返回")
  579.     @bottomkeyhelp_window.add("C","第一人物确定")
  580.   end
  581.   #--------------------------------------------------------------------------
  582.   # ○ キーヘルプを設定 3
  583.   #--------------------------------------------------------------------------
  584.   def set_keyhelp3
  585.     @bottomkeyhelp_window.clear
  586.     @bottomkeyhelp_window.add("B","返回")
  587.     @bottomkeyhelp_window.add("C","交换人物确定")
  588.   end
  589. end



  590. #==============================================================================
  591. # □ Window_BottomKeyHelp
  592. #------------------------------------------------------------------------------
  593. #     画面下で操作説明をする透明なウィンドウです。
  594. #==============================================================================
  595. class Window_BottomKeyHelp < Window_Base
  596.   #--------------------------------------------------------------------------
  597.   # ○ オブジェクト初期化
  598.   #--------------------------------------------------------------------------
  599.   def initialize
  600.     super(0, 432, 640, 64)
  601.     self.contents = Bitmap.new(width - 32, height - 32)
  602.     self.opacity = 0
  603.     clear
  604.   end
  605.   #--------------------------------------------------------------------------
  606.   # ○ クリア
  607.   #--------------------------------------------------------------------------
  608.   def clear
  609.     self.contents.clear
  610.     @now_x = 608
  611.   end
  612.   #--------------------------------------------------------------------------
  613.   # ○ 追加
  614.   #--------------------------------------------------------------------------
  615.   def add(key, explanation)
  616.     # 計算
  617.     self.contents.font.size = 20
  618.     x  = self.contents.text_size(key).width
  619.     self.contents.font.size = 16
  620.     x += self.contents.text_size(explanation).width + 8
  621.     @now_x -= x
  622.     # 描写
  623.     self.contents.font.size = 20
  624.     self.contents.font.color = system_color#Color.new(20, 100, 255, 255)
  625.     self.contents.draw_text(@now_x, -2, x, 32, key, 0)
  626.     self.contents.font.size = 16
  627.     self.contents.font.color = normal_color#Color.new(20, 100, 255, 255)
  628.     self.contents.draw_text(@now_x, -2, x, 32, explanation, 2)
  629.     # 余白
  630.     @now_x -= 32
  631.   end
  632. end
复制代码
你说的第2个脚本偶没用过,日站的那个人物扩张系统跟跟随系统不冲突,如果不会改的话,就换这个脚本吧
FTM正式版已经发布,点击图片开启传送门
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
84 小时
注册时间
2013-4-19
帖子
35
3
 楼主| 发表于 2013-5-18 15:55:41 | 只看该作者
本帖最后由 jinae 于 2013-5-18 16:15 编辑
wingzeroplus 发表于 2013-5-18 14:49
你说的第2个脚本偶没用过,日站的那个人物扩张系统跟跟随系统不冲突,如果不会改的话,就换这个脚本吧
...


先谢过再去试。


====

刚把你给的脚本弄进去,冲突了。我用了空轨菜单的系统,里面有整合过类似的组队位置变换功能,但是不如你这个好,空轨那个是相反的毛病,在地图上显示后面的人变了,但是领队的样子没变。。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
99
在线时间
60 小时
注册时间
2013-1-29
帖子
45
5
发表于 2013-5-18 20:47:31 | 只看该作者
公共事件-并列执行
判定按下 'X’ 键-
角色1(领头)离开
角色1(变成跟着的)加入

或者在每一个地图建个事件(依旧并列)
判定按下 'X’ 键
公共事件
角色1(领头)离开
角色1(变成跟着的)加入


就这么简单

点评

谢谢。虽然没用你的方法。  发表于 2013-5-18 21:12
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
54
在线时间
12 小时
注册时间
2022-4-15
帖子
16
6
发表于 2022-4-20 23:01:49 | 只看该作者
谢谢大佬们,学到了

点评

唷,盗墓贼  发表于 2022-4-21 01:50
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-27 22:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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