Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: whitespirits on July 24, 2014, 06:10:10 am

Title: Flying system
Post by: whitespirits on July 24, 2014, 06:10:10 am
Hi guys so i came across this script which will be great for a world map addon, Im just wondering why it isnt working? I set the item value and made a sprite with -voar at the end matching my characters sprite name and nothing happens?   

	

    #==============================================================
    # http://thiagodd.blogspot.com.br
    #
    # [TSDA] Fly System
    #   --> Version 1.1
    # by thiago_d_d
    #
    #--------------------------------------------------------------
    # * Features
    #--------------------------------------------------------------
    # + Adds an flyght system.
    #
    #--------------------------------------------------------------
    # * Install
    #--------------------------------------------------------------
    # Put this script above main
    # And, you need the graphics of the characters flying, so put them
    # with the -voar suffix.
    # For Example, if your character normal graphics is 001-Fighter01,
    # you need to have another graphic with the name 001-Fighter01-voar
    #
    #--------------------------------------------------------------
    # * Configuration
    #--------------------------------------------------------------
    # You can make the hero fly only if it have an item equipped.
    # For that, configure USE_WINGS below to true.
    # And you have to put "wings items" IDs to ASAS_IDS
    #==============================================================
    class TSDA
      #Id of items that are wings
      ASAS_IDS = [59]
      #Use wings?
      USE_WINGS = true
    end
    #--------------------------------------------------------------
    class Game_Character
      attr_accessor   :through
      attr_accessor   :move_speed
      attr_accessor   :always_on_top
      attr_accessor   :character_name
    end
    #--------------------------------------------------------------
    class Scene_Map
      alias old_update_voar update
      def update
        old_update_voar
        if Input.press?(Input::Y)
          if ($game_party.actors[0].character_name + "-voar") ==
            $game_player.character_name
            return
          end
          if TSDA::USE_WINGS
            id = $game_party.actors[0].armor4_id
            if TSDA::ASAS_IDS.include?(id)
              $game_player.through = true
              $game_player.move_speed = 4.5
              $game_player.always_on_top = true
              $game_player.character_name =
              $game_party.actors[0].character_name + "-voar"
            end
          else
            $game_player.through = true
            $game_player.move_speed = 4.5
            $game_player.always_on_top = true
            $game_player.character_name =
            $game_party.actors[0].character_name + "-voar"
          end
        else
          if $game_party.actors[0].character_name ==
            $game_player.character_name
            return
          end
          $game_player.through = false
          $game_player.move_speed = 4
          $game_player.always_on_top = false
          $game_player.refresh
        end
      end
    end

Title: Re: Flying system
Post by: Blizzard on July 24, 2014, 06:35:41 am
You have to press the Y button. I think it was A, S or D.