幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
12
返回列表 发新帖
楼主: 5166rpg

[RM2K&2K3] 45度战斗的问题已解决,非常感谢,可以结贴了!

[复制链接]

4

主题

109

帖子

2494

积分

⑥精研

不灌水者

积分
2494
发表于 2006-8-12 01:24:41 | 显示全部楼层
不太困难,,,不过,,这跟45度战斗有何关系?
Main前插入,楼主游戏还有逃跑选项的话那必定有冲突,那样的话新开个工程试试看,反正就是这原理
  1. class Scene_Battle
  2. def main
  3. $game_temp.in_battle = true
  4. $game_temp.battle_turn = 0
  5. $game_temp.battle_event_flags.clear
  6. $game_temp.battle_abort = false
  7. $game_temp.battle_main_phase = false
  8. $game_temp.battleback_name = $game_map.battleback_name
  9. $game_temp.forcing_battler = nil
  10. $game_system.battle_interpreter.setup(nil, 0)
  11. @troop_id = $game_temp.battle_troop_id
  12. $game_troop.setup(@troop_id)
  13. s1 = $data_system.words.attack
  14. s2 = $data_system.words.skill
  15. s3 = $data_system.words.guard
  16. s4 = $data_system.words.item
  17. s5 = "状态"
  18. @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4,s5])
  19. @actor_command_window.y = 128
  20. @actor_command_window.back_opacity = 160
  21. @actor_command_window.active = false
  22. @actor_command_window.visible = false
  23. @party_command_window = Window_PartyCommand.new
  24. @help_window = Window_Help.new
  25. @help_window.back_opacity = 160
  26. @help_window.visible = false
  27. @status_window = Window_BattleStatus.new
  28. @message_window = Window_Message.new
  29. @spriteset = Spriteset_Battle.new
  30. @wait_count = 0
  31. if $data_system.battle_transition == ""
  32. Graphics.transition(20)
  33. else
  34. Graphics.transition(40, "Graphics/Transitions/" +$data_system.battle_transition)
  35. end
  36. start_phase1
  37. loop do
  38. Graphics.update
  39. Input.update
  40. update
  41. if $scene != self
  42. break
  43. end
  44. end
  45. $game_map.refresh
  46. Graphics.freeze
  47. @actor_command_window.dispose
  48. @party_command_window.dispose
  49. @help_window.dispose
  50. @status_window.dispose
  51. @message_window.dispose
  52. if @skill_window != nil
  53. @skill_window.dispose
  54. end
  55. if @item_window != nil
  56. @item_window.dispose
  57. end
  58. if @result_window != nil
  59. @result_window.dispose
  60. end
  61. if @actors_window != nil
  62. @result_window.dispose
  63. end
  64. @spriteset.dispose
  65. if $scene.is_a?(Scene_Title)
  66. Graphics.transition
  67. Graphics.freeze
  68. end
  69. if $BTEST and not $scene.is_a?(Scene_Gameover)
  70. $scene = nil
  71. end
  72. end
  73. def update_phase3_basic_command
  74. if Input.trigger?(Input::B)
  75. $game_system.se_play($data_system.cancel_se)
  76. phase3_prior_actor
  77. return
  78. end
  79. if Input.trigger?(Input::C)
  80. case @actor_command_window.index
  81. when 0  # 攻击
  82. $game_system.se_play($data_system.decision_se)
  83. @active_battler.current_action.kind = 0
  84. @active_battler.current_action.basic = 0
  85. start_enemy_select
  86. when 1  # 特技
  87. $game_system.se_play($data_system.decision_se)
  88. @active_battler.current_action.kind = 1
  89. start_skill_select
  90. when 2  # 防御
  91. $game_system.se_play($data_system.decision_se)
  92. @active_battler.current_action.kind = 0
  93. @active_battler.current_action.basic = 1
  94. phase3_next_actor
  95. when 3  # 物品
  96. $game_system.se_play($data_system.decision_se)
  97. @active_battler.current_action.kind = 2
  98. start_item_select
  99. when 4  # 状态
  100. actor=$game_party.actors[@actor_index]
  101. @actors_window = Window_Status.new(actor)
  102. @actors_window.z=999999
  103. end
  104. return
  105. end
  106. end
  107. def update_phase3
  108. if @enemy_arrow != nil
  109. update_phase3_enemy_select
  110. elsif @actor_arrow != nil
  111. update_phase3_actor_select
  112. elsif @skill_window != nil
  113. update_phase3_skill_select
  114. elsif @item_window != nil
  115. update_phase3_item_select
  116. elsif  @actors_window != nil
  117. update_actorstatus
  118. elsif @actor_command_window.active
  119. update_phase3_basic_command
  120. end
  121. end
  122.   
  123. def update_actorstatus
  124. if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  125. $game_system.se_play($data_system.cancel_se)
  126. @actors_window.dispose
  127. @actors_window=nil
  128. return
  129. end
  130. end
  131. end
复制代码
在鄙视中变强
回复 支持 反对

使用道具 举报

13

主题

35

帖子

197

积分

③业余

积分
197
 楼主| 发表于 2006-8-12 08:29:18 | 显示全部楼层
楼上的各位达人,大家辛苦了,我就是希望在这个菜单上加上一个”状态“,然后在战斗中可以查看角色的状态,请帮忙解决下,拜托了!
回复 支持 反对

使用道具 举报

4

主题

109

帖子

2494

积分

⑥精研

不灌水者

积分
2494
发表于 2006-8-12 11:44:52 | 显示全部楼层
  1. class Scene_Battle
  2. def main
  3. $game_temp.in_battle = true
  4. $game_temp.battle_turn = 0
  5. $game_temp.battle_event_flags.clear
  6. $game_temp.battle_abort = false
  7. $game_temp.battle_main_phase = false
  8. $game_temp.battleback_name = $game_map.battleback_name
  9. $game_temp.forcing_battler = nil
  10. $game_system.battle_interpreter.setup(nil, 0)
  11. @troop_id = $game_temp.battle_troop_id
  12. $game_troop.setup(@troop_id)
  13. s1 = $data_system.words.attack
  14. s2 = $data_system.words.skill
  15. s3 = $data_system.words.guard
  16. s4 = $data_system.words.item
  17. s5 = "状态"
  18. s6 = "逃跑"
  19. @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4,s5,s6])
  20. @actor_command_window.y = 94
  21. @actor_command_window.back_opacity = 160
  22. @actor_command_window.active = false
  23. @actor_command_window.visible = false
  24. @party_command_window = Window_PartyCommand.new
  25. @help_window = Window_Help.new
  26. @help_window.back_opacity = 160
  27. @help_window.visible = false
  28. @status_window = Window_BattleStatus.new
  29. @message_window = Window_Message.new
  30. @spriteset = Spriteset_Battle.new
  31. @wait_count = 0
  32. if $data_system.battle_transition == ""
  33. Graphics.transition(20)
  34. else
  35. Graphics.transition(40, "Graphics/Transitions/" +$data_system.battle_transition)
  36. end
  37. start_phase1
  38. loop do
  39. Graphics.update
  40. Input.update
  41. update
  42. if $scene != self
  43. break
  44. end
  45. end
  46. $game_map.refresh
  47. Graphics.freeze
  48. @actor_command_window.dispose
  49. @party_command_window.dispose
  50. @help_window.dispose
  51. @status_window.dispose
  52. @message_window.dispose
  53. if @skill_window != nil
  54. @skill_window.dispose
  55. end
  56. if @item_window != nil
  57. @item_window.dispose
  58. end
  59. if @result_window != nil
  60. @result_window.dispose
  61. end
  62. if @actors_window != nil
  63. @result_window.dispose
  64. end
  65. @spriteset.dispose
  66. if $scene.is_a?(Scene_Title)
  67. Graphics.transition
  68. Graphics.freeze
  69. end
  70. if $BTEST and not $scene.is_a?(Scene_Gameover)
  71. $scene = nil
  72. end
  73. end
  74. def update_phase3_basic_command
  75. if Input.trigger?(Input::B)
  76. $game_system.se_play($data_system.cancel_se)
  77. phase3_prior_actor
  78. return
  79. end
  80. if Input.trigger?(Input::C)
  81. case @actor_command_window.index
  82. when 0 # 攻击
  83. $game_system.se_play($data_system.decision_se)
  84. @active_battler.current_action.kind = 0
  85. @active_battler.current_action.basic = 0
  86. start_enemy_select
  87. when 1 # 特技
  88. $game_system.se_play($data_system.decision_se)
  89. @active_battler.current_action.kind = 1
  90. start_skill_select
  91. when 2 # 防御
  92. $game_system.se_play($data_system.decision_se)
  93. @active_battler.current_action.kind = 0
  94. @active_battler.current_action.basic = 1
  95. phase3_next_actor
  96. when 3 # 物品
  97. $game_system.se_play($data_system.decision_se)
  98. @active_battler.current_action.kind = 2
  99. start_item_select
  100. when 4 # 状态
  101. actor=$game_party.actors[@actor_index]
  102. @actors_window = Window_Status.new(actor)
  103. @actors_window.z=999999
  104. when 5 # 逃跑
  105. update_phase2_escape
  106. end
  107. return
  108. end
  109. end
  110. def update_phase3
  111. if @enemy_arrow != nil
  112. update_phase3_enemy_select
  113. elsif @actor_arrow != nil
  114. update_phase3_actor_select
  115. elsif @skill_window != nil
  116. update_phase3_skill_select
  117. elsif @item_window != nil
  118. update_phase3_item_select
  119. elsif @actors_window != nil
  120. update_actorstatus
  121. elsif @actor_command_window.active
  122. update_phase3_basic_command
  123. end
  124. end
  125. def update_actorstatus
  126. if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  127. $game_system.se_play($data_system.cancel_se)
  128. @actors_window.dispose
  129. @actors_window=nil
  130. return
  131. end
  132. end
  133. end
复制代码

会去掉战斗逃跑选项的就自己去掉吧
在鄙视中变强
回复 支持 反对

使用道具 举报

13

主题

35

帖子

197

积分

③业余

积分
197
 楼主| 发表于 2006-8-12 13:42:25 | 显示全部楼层
非常感谢楼上达人的帮忙,我已经试过了,暂时没问题,我晚上回去再好好调试,确定没问题我明天再来公告,然后结贴,真心的谢谢你们! [s:8]
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2025-6-29 06:14 , Processed in 0.019456 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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