Advertisement
thiago_d_d

Flyght System

Jan 16th, 2013
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.56 KB | None | 0 0
  1. #==============================================================
  2. # http://thiagodd.blogspot.com.br
  3. #
  4. # [TSDA] Fly System
  5. #   --> Version 1.1
  6. # by thiago_d_d
  7. #
  8. #--------------------------------------------------------------
  9. # * Features
  10. #--------------------------------------------------------------
  11. # + Adds an flyght system.
  12. #
  13. #--------------------------------------------------------------
  14. # * Install
  15. #--------------------------------------------------------------
  16. # Put this script above main
  17. # And, you need the graphics of the characters flying, so put them
  18. # with the -voar suffix.
  19. # For Example, if your character normal graphics is 001-Fighter01,
  20. # you need to have another graphic with the name 001-Fighter01-voar
  21. #
  22. #--------------------------------------------------------------
  23. # * Configuration
  24. #--------------------------------------------------------------
  25. # You can make the hero fly only if it have an item equipped.
  26. # For that, configure USE_WINGS below to true.
  27. # And you have to put "wings items" IDs to ASAS_IDS
  28. #==============================================================
  29. class TSDA
  30.   #Id of items that are wings
  31.   ASAS_IDS = [33]
  32.   #Use wings?
  33.   USE_WINGS = false
  34. end
  35. #--------------------------------------------------------------
  36. class Game_Character
  37.   attr_accessor   :through
  38.   attr_accessor   :move_speed
  39.   attr_accessor   :always_on_top
  40.   attr_accessor   :character_name
  41. end
  42. #--------------------------------------------------------------
  43. class Scene_Map
  44.   alias old_update_voar update
  45.   def update
  46.     old_update_voar
  47.     if Input.press?(Input::Y)
  48.       if ($game_party.actors[0].character_name + "-voar") ==
  49.         $game_player.character_name
  50.         return
  51.       end
  52.       if TSDA::USE_WINGS
  53.         id = $game_party.actors[0].armor4_id
  54.         if TSDA::ASAS_IDS.include?(id)
  55.           $game_player.through = true
  56.           $game_player.move_speed = 4.5
  57.           $game_player.always_on_top = true
  58.           $game_player.character_name =
  59.           $game_party.actors[0].character_name + "-voar"
  60.         end
  61.       else
  62.         $game_player.through = true
  63.         $game_player.move_speed = 4.5
  64.         $game_player.always_on_top = true
  65.         $game_player.character_name =
  66.         $game_party.actors[0].character_name + "-voar"
  67.       end
  68.     else
  69.       if $game_party.actors[0].character_name ==
  70.         $game_player.character_name
  71.         return
  72.       end
  73.       $game_player.through = false
  74.       $game_player.move_speed = 4
  75.       $game_player.always_on_top = false
  76.       $game_player.refresh
  77.     end
  78.   end
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement