IceDragon200

Untitled

Jul 2nd, 2011
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. #--------------------------------------------------------------------------
  2. # * Start Actor Command Selection
  3. #--------------------------------------------------------------------------
  4.  
  5. class Scene_Battle < Scene_Base
  6.  
  7. def start_actor_command_selection
  8. @actor_command_window.index = 0
  9. @actor_command_window.x = 0
  10. @actor_command_window.y = 220
  11. @actor_command_window.width = Graphics.width
  12. @actor_command_window.height = 56
  13. @actor_command_window.setup(@active_battler)
  14. @actor_command_window.active = true
  15. @actor_command_window.visible = true
  16. end
  17.  
  18. #--------------------------------------------------------------------------
  19. # * Update Actor Command Selection
  20. #--------------------------------------------------------------------------
  21. def update_actor_command_selection
  22. @status_window.visible = true
  23. if Input.trigger?(Input::C )
  24. case @actor_command_window.index
  25.  
  26. when 0 # Attack
  27. Sound.play_decision
  28. start_skill_selection
  29. when 1 # Item
  30. Sound.play_decision
  31. start_item_selection
  32. when 2 # Run
  33. if $game_troop.can_escape == false
  34. Sound.play_buzzer
  35. return
  36. end
  37. Sound.play_decision
  38. process_escape
  39. end
  40. end
  41. end
  42. end
  43.  
  44. #==============================================================================
  45. # * Window_ActorCommand
  46. #------------------------------------------------------------------------------
  47. # This process starts the actor command window.
  48. #==============================================================================
  49. class Window_ActorCommand < Window_Command
  50.  
  51. #--------------------------------------------------------------------------
  52. # * Setup
  53. #--------------------------------------------------------------------------
  54. def setup(actor)
  55.  
  56. s1 = Vocab::attack
  57. s2 = Vocab::item
  58. s3 = Vocab::escape
  59.  
  60. if actor.class.skill_name_valid
  61. s1 = actor.class.skill_name
  62. end
  63.  
  64. @commands = [s1, s2, s3]
  65. @column_max = @commands.size
  66. @item_max = @commands.size
  67. @spacing = 0 # // @spacing should never ever be below 0
  68. refresh()
  69. self.index = 0
  70. end
  71.  
  72. def refresh()
  73. create_contents()
  74. for i in 0...@item_max ; draw_item(i) ; end
  75. end
  76.  
  77. end
Advertisement
Add Comment
Please, Sign In to add comment