• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Change the Acro and Mach Bike graphic

Aljen

The Lost Boy...
  • 125
    Posts
    11
    Years
    https://www.pokecommunity.com/threads/317940
    So i know that we have a Mach and Acro Bike script, but is there a way to change the acro sprite completely to Acrogirl or Acroboy without pressing A? Like instead of using Acrobike, i want to make a Skater? Oh and is there a way to set player always on top when using Acro bike? Thank you
     
    This replaces the "def Kernel.pbUpdateVehicle" or "def pbUpdateVehicle" in the Acro_Mach script (there's another in PField_Field, but the one in Acro_Mach overwrites it).
    Code:
    def Kernel.pbUpdateVehicle
      meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
      if meta
        if $PokemonGlobal.diving
          $game_player.character_name=pbGetPlayerCharset(meta,5) # Diving graphic
        elsif $PokemonGlobal.surfing
          $game_player.character_name=pbGetPlayerCharset(meta,3) # Surfing graphic
        elsif $PokemonGlobal.acrobike
          trainer=$Trainer if !trainer
          outfit=trainer ? trainer.outfit : 0
          if outfit==0
            $game_player.character_name=Settings::AcroBikeFileName[$PokemonGlobal.playerID]
          else
            $game_player.character_name=Settings::AcroBikeFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
          end
        elsif $PokemonGlobal.machbike
          trainer=$Trainer if !trainer
          outfit=trainer ? trainer.outfit : 0
          if outfit==0
            $game_player.character_name=Settings::MachBikeFileName[$PokemonGlobal.playerID]
          else
            $game_player.character_name=Settings::MachBikeFileName[$PokemonGlobal.playerID]+"_"+outfit.to_s
          end
        elsif $PokemonGlobal.bicycle
          $game_player.character_name=pbGetPlayerCharset(meta,2) # Bicycle graphic
        else
          $game_player.character_name=pbGetPlayerCharset(meta,1) # Regular graphic
        end
      end
    end
    Will allow the Mach and Acro Bikes to always be displayed when riding them, but at the expense of the Acro Bike's wheelie. Considering you want to replace the Acro Bike with a different mode of transportation anyway, that's not a problem. You'll also want these:
    Code:
    # Add Acro Bike Property
    ItemHandlers::UseInField.add(:ACROBIKE,proc{|item|
       if pbBikeCheck
         $PokemonGlobal.machbike = false
         if $PokemonGlobal.bicycle && !$PokemonGlobal.acrobike
           $PokemonGlobal.acrobike=true
           Kernel.pbUpdateVehicle
         elsif $PokemonGlobal.acrobike
           $PokemonGlobal.acrobike=false
           Kernel.pbDismountBike
         else
           $PokemonGlobal.acrobike = true
           Kernel.pbMountBike 
         end
       end
    })
    
    # Add Mach Bike Property
    ItemHandlers::UseInField.add(:MACHBIKE,proc{|item|
       if pbBikeCheck
         $PokemonGlobal.acrobike = false
         if $PokemonGlobal.bicycle && !$PokemonGlobal.machbike
           $PokemonGlobal.machbike = true
           Kernel.pbUpdateVehicle
         elsif $PokemonGlobal.machbike
           $PokemonGlobal.machbike = false
           Kernel.pbDismountBike
         else
           $PokemonGlobal.machbike = true
           Kernel.pbMountBike 
         end
       end
    })
    
    ItemHandlers::UseInField.add(:BICYCLE,proc{|item|
       if pbBikeCheck
         if $PokemonGlobal.machbike || $PokemonGlobal.acrobike
           $PokemonGlobal.machbike = false
           $PokemonGlobal.acrobike = false
           Kernel.pbUpdateVehicle
         elsif $PokemonGlobal.bicycle
           Kernel.pbDismountBike
         else
           Kernel.pbMountBike 
         end
       end
    })

    They replace the item handlers in the Acro_Mach script, and if there isn't a Bicycle handler in the Acro_Mach script, then it also replaces the one in PItem_ItemEffects.
     
    Thanks Rot8er_ConeX, xD
    Work like a charm xD, One more question, is there a way to make the player always on top or through when riding acro one? xD
     
    Back
    Top