Advertisement
Doesnt

essentials controls stuff

Dec 9th, 2015
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. ***Backing up before doing anything here is a Good Idea.
  2.  
  3. ***To set things up, in PSystem_Controls:
  4. def self.buttonToKey(button)
  5. case button
  6. when Input::DOWN
  7. return [0x28] # Down
  8. when Input::LEFT
  9. return [0x25] # Left
  10. when Input::RIGHT
  11. return [0x27] # Right
  12. when Input::UP
  13. return [0x26] # Up
  14. when Input::A #now unused
  15. return []
  16. when Input::B #NO, RUN
  17. return [0x58] # X
  18. when Input::C #YES
  19. return [0x5A] # A
  20. when Input::X #OPEN MENU
  21. return [0x53] # S
  22. when Input::Y #still unused
  23. return []
  24. when Input::Z
  25. return [0x44] # D
  26.  
  27. ***To move the Open Menu command, in Scene_Map:
  28. if Input.trigger?(Input::A)
  29. if !pbMapInterpreterRunning? && $PokemonGlobal && $PokemonSystem && $PokemonSystem.runstyle==1
  30. $PokemonGlobal.runtoggle=!$PokemonGlobal.runtoggle
  31. end
  32. end
  33. if $DEBUG and Input.press?(Input::F9)
  34. $game_temp.debug_calling = true
  35. end
  36.  
  37.  
  38. ***To make the new Open Menu also work to close the menu, in PScreen_PauseMenu:
  39. class PokemonMenu_Scene
  40. def pbShowCommands(commands)
  41. ret=-1
  42. cmdwindow=@sprites["cmdwindow"]
  43. cmdwindow.viewport=@viewport
  44. cmdwindow.index=$PokemonTemp.menuLastChoice
  45. cmdwindow.resizeToFit(commands)
  46. cmdwindow.commands=commands
  47. cmdwindow.x=Graphics.width-cmdwindow.width
  48. cmdwindow.y=0
  49. cmdwindow.visible=true
  50. loop do
  51. cmdwindow.update
  52. Graphics.update
  53. Input.update
  54. pbUpdateSceneMap
  55. if Input.trigger?(Input::X) || Input.trigger?(Input::B)
  56. ret=-1
  57. break
  58. end
  59.  
  60.  
  61.  
  62. ***To rebind Run to Cancel, allowing the latter to work in odd circumstances, in Walk_Run:
  63. def pbCanRun?
  64. return false if $game_temp.menu_calling
  65. terrain=pbGetTerrainTag
  66. input=($PokemonSystem.runstyle==1) ? ($PokemonGlobal && $PokemonGlobal.runtoggle) : Input.press?(Input::B)
  67. return input &&
  68. !pbMapInterpreterRunning? && !@move_route_forcing &&
  69. $PokemonGlobal && $PokemonGlobal.runningShoes &&
  70. !$PokemonGlobal.diving && !$PokemonGlobal.surfing &&
  71. !$PokemonGlobal.bicycle && !PBTerrain.onlyWalk?(terrain)
  72. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement