Advertisement
TroyZ

TroyZ - Inverted Movements

Dec 23rd, 2018
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.01 KB | None | 0 0
  1. # ==============================================================================
  2. # ▼▼▼▼▼▼                   TroyZ - Inverted Movements                     ▼▼▼▼▼▼
  3. # ==============================================================================
  4. # Script by : Agung Prasetyo(TroyZ)
  5. # Contact me by : - Email agung.endisnear.xyz@gmail.com
  6. #                 - Handphone 082324317485
  7. # Engine : VXAce
  8. # Level : Easy
  9. # Version : 1.0
  10. # ------------------------------------------------------------------------------
  11. # Change Logs :
  12. # 23 December 2018 : Version 1.0 released
  13. # ------------------------------------------------------------------------------
  14. # How this work :
  15. # This script allows you to reverse the movements input of players on the map.
  16. # The function can be altered by using switch.
  17. # ------------------------------------------------------------------------------
  18. # How to use :
  19. # Place it between material and main. Edit the switch used inside the script
  20. # module. Turn on the said switch to reverse the movements input, turn it off to
  21. # revert to default movements input.
  22. # ------------------------------------------------------------------------------
  23. # Compatibility issues :
  24. # None yet. If you found some, let me know, and bug fixes will come out soon.
  25. # ------------------------------------------------------------------------------
  26. # Who to credit :
  27. # - Allah swt. : For the chance of living that he has given to me.
  28. # - Nabi Muhammad saw. : As a leader and messenger and prophet of Muslim.
  29. #                        I'm proud to be your follower. :)
  30. # - Agung Prasetyo(TroyZ) : Thats me, of course, the ones that made this script. :P
  31. # ------------------------------------------------------------------------------
  32. # License :
  33. # - Free Game : Just credit those names above.
  34. # - Commercial Game : Same as free game's license.
  35. # ------------------------------------------------------------------------------
  36. $imported = {} if $imported.nil?
  37. $imported[:TroyZ_MapBattleback] = true
  38. # ------------------------------------------------------------------------------
  39. # Configuration of script starts here
  40. # ------------------------------------------------------------------------------
  41. module AGUNG
  42.   module REV_MOVE
  43.     REV_MOVE_SWITCH = 200 # Turn on this switch to use reversed movements input.
  44.   end
  45. end
  46. # ------------------------------------------------------------------------------
  47. # End of Configuration
  48. # ------------------------------------------------------------------------------
  49.  
  50. # ------------------------------------------------------------------------------
  51. # You shall not pass
  52. # ------------------------------------------------------------------------------
  53. class Game_Player < Game_Character
  54.   include AGUNG::REV_MOVE
  55.   def move_by_input
  56.     return if !movable? || $game_map.interpreter.running?
  57.     if $game_switches[REV_MOVE_SWITCH]      
  58.       move_straight(10 - Input.dir4) if Input.dir4 > 0
  59.     else
  60.       move_straight(Input.dir4) if Input.dir4 > 0
  61.     end
  62.   end
  63. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement