Advertiser Content
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Rock Climb with Overworld Animation
Current Version: 1.1


-------
Implements Rock Climbing and adds an animated effect for using the Rock Climb HM in the overworld.

*This script was loosely based on an old Rock Climb resource.

*This comes with stock graphics for Red and Leaf. If you want to use different characters, you will need to make the animations yourself.

See the notes at the top of the script for installation and usage instructions!

Download:
https://www.dropbox.com/s/mttrj2zmpnkktt2/Rock%20Climb%20Animation%20v1.1.7z?dl=0

Old Versions:


Changelog:
Spoiler:

v1.1:
- The script now includes a standalone already-set-up Rock Climbing HM compatible with both PE v16 and v17+.

v1.0
- Initial release.


Script:
Spoiler:

NOTE: You need to download the resource pack above, too. This script is included in that pack, I am merely putting it here as a quickly accessible reference.

#==============================================================================#
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
#==============================================================================#
#                          Rock Climb with Animation                           #
#                                    v1.1                                      #
#                             By Ulithium_Dragon                               #
#                                                                              #
#==============================================================================#
#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\#
#==============================================================================#
#          Implements Rock Climbing and plays a custom animation               #
#             when using the Rock Climb HM in the overworld.                   #
#                                                                              #
#------------------------------------------------------------------------------#
#        :::::This script is compatible with both PE v16 and v17+:::::         #
#==============================================================================#
#                                                                              #
#------------------------------------------------------------------------------#
# **Place this script somewhere above Main and below PField_FieldMoves.        #
#  (PField_HiddenMoves for if you're using a version of Essentials below v17.) #
#                                                                              #
#------------------------------------------------------------------------------#
# **Place the Rock Climb graphics on the tilesheets you want to use them with. #
# (You will have to do this yourself with an image editing program like GIMP.) #
#                                                                              #
# **Make sure to change the terrain tags on the tiles you place to the ones    #
#  defined below under "ROCKCLIMB_TERRAINTAG" and "ROCKCREST_TERRAINTAG"!      #
#                                                                              #
#==============================================================================#
=begin
#------------------------------------------------------------------------------#
# *NOTE: If you want to have Rock Climb as an HM, you will need to add a new   #
#  item to your "items.txt" PSB file...                                        #
#                                                                              #
#-----------#                                                                  #
#| Example: |                                                                  #
#-----------#                                                                  #
550,HM09,HM09,HM09s,4,0,"A charging attack that may also leave the foe confused. It can also be used to scale rocky walls.",4,0,0,ROCKCLIMB
#                                                                              #
#------------------------------------------------------------------------------#
#  ...and add a new section to the "tm.txt" PSB file.                          #
#                                                                              #
#-----------#                                                                  #
#| Example: |                                                                  #
#-----------#                                                                  #
[ROCKCLIMB]
VENUSAUR,BLASTOISE,SANDSHREW,SANDSLASH,NIDOQUEEN,NIDOKING,GOLDUCK,MANKEY,PRIMEAPE,ARCANINE,POLIWRATH,MACHOP,MACHOKE,MACHAMP,GEODUDE,GRAVELER,GOLEM,ONIX,CUBONE,MAROWAK,HITMONLEE,HITMONCHAN,LICKITUNG,RHYHORN,RHYDON,CHANSEY,KANGASKHAN,ELECTABUZZ,MAGMAR,PINSIR,TAUROS,OMASTAR,KABUTOPS,SNORLAX,MEWTWO,MEW,MEGANIUM,TYPHLOSION,FERALIGATR,AMPHAROS,STEELIX,GRANBULL,URSARING,BLISSEY,RAIKOU,ENTEI,SUICUNE,TYRANITAR,SCEPTILE,BLAZIKEN,SWAMPERT,LUDICOLO,VIGOROTH,SLAKING,EXPLOUD,MAKUHITA,HARIYAMA,AGGRON,ZANGOOSE,REGIROCK,REGICE,REGISTEEL,GROUDON,TURTWIG,GROTLE,TORTERRA,CHIMCHAR,MONFERNO,INFERNAPE,EMPOLEON,BIBAREL,CRANIDOS,RAMPARDOS,GIBLE,GABITE,GARCHOMP,MUNCHLAX,LUCARIO,DRAPION,CROAGUNK,TOXICROAK,ABOMASNOW,LICKILICKY,RHYPERIOR,ELECTIVIRE,MAGMORTAR,MAMOSWINE,HEATRAN,REGIGIGAS,GIRATINA,DARKRAI,ARCEUS
#                                                                              #
=end                                                                           #
#------------------------------------------------------------------------------#
#                                 OPTIONS                                      #
#==============================================================================#
# There are Terrain Tag slots that need to be reserved for the rock tiles.     #
ROCKCLIMB_TERRAINTAG = 17  #Default: 17
ROCKCREST_TERRAINTAG = 18  #Default: 18
# The badge needed to use Rock Climb in the field.                             #
BADGEFORROCKCLIMB    = 1   #Default: 8
# Descending does not have a custom animation, and was not something that      #
#  Rock Climb ever did. If you want to use descending, set this to "true".     #
ENABLE_DESCENDING = false  #Default: false
#==============================================================================#
#//////////////////////////////////////////////////////////////////////////////#
#==============================================================================#

#==========#
module PBTerrain
  RockClimb = ROCKCLIMB_TERRAINTAG  #For normal Rock Climb tiles.
  RockCrest = ROCKCREST_TERRAINTAG  #For the topmost Rock Climb tile.

  def PBTerrain.isPassableRockTag?(tag)
    return tag==PBTerrain::RockCrest
  end

  def PBTerrain.isRockTag?(tag)
    return tag==PBTerrain::RockCrest||
           tag==PBTerrain::RockClimb
  end
end
#-----#


#==========#
class PokemonGlobalMetadata
  attr_accessor :rockclimbing
  @rockclimbing = false
end
#-----#


#==========#
def Kernel.pbAscendRock(event=nil)
  $ud_hideWindowskin = true  #Hide the window box when playing the animation.
  event=$game_player if !event
  if !event || event.direction!=8 #Can't ascend if not facing up!
    $ud_hideWindowskin = false
    return
  end
  oldthrough=event.through
  oldmovespeed=event.move_speed
  terrain=Kernel.pbFacingTerrainTag
  if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest
    $ud_hideWindowskin = false
    return
  end
  event.through=true
  event.move_speed=2
  Kernel.pbCancelVehicles
  $PokemonEncounters.clearStepCount
  $PokemonGlobal.rockclimbing=true
  Kernel.pbJumpToward
  Kernel.pbUpdateVehicle

  #$rc_spritedispose = false
  $game_player.opacity = 0
  $rc_framewait = 2
  $rc_spriteframe = 1
  movementcounter = 0

  while $rc_spriteframe < 14
    Kernel.pbRockClimbAscendFrames
    $rc_spriteframe += 1
  end
  $rc_framewait = 1
  loop do
    $rc_spriteframe = 25 if $rc_spriteframe > 28
    if movementcounter == 7
      event.move_up
      movementcounter = 0
    end
    Kernel.pbRockClimbAscendFrames
    terrain=pbGetTerrainTag(event)
    if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest || $PokemonGlobal.rockclimbing=false
      $rc_spriteframe = 29
      break
    end
    movementcounter += 1
    $rc_spriteframe += 1
  end
  $rc_framewait = 2
  while $rc_spriteframe <= 51
    Kernel.pbRockClimbAscendFrames
    $rc_spriteframe += 1
  end
  #$rc_framewait = 4
  $rc_spriteframe = 51
  $game_player.opacity = 255
  Kernel.pbRockClimbAscendFrames

  event.through=oldthrough
  event.move_speed=oldmovespeed
  $game_map.autoplayAsCue
  $game_player.increase_steps
  $ud_hideWindowskin = false  #Unhide the window box after the animation.
end
#-----#


#==========#
def Kernel.pbDescendRock(event=nil)
  event=$game_player if !event
  return if !event
  return if event.direction!=2 # Can't descend if not facing down
  oldthrough=event.through
  oldmovespeed=event.move_speed
  terrain=Kernel.pbFacingTerrainTag
  return if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest
  event.through=true
  event.move_speed=2
  Kernel.pbCancelVehicles
  $PokemonEncounters.clearStepCount
  $PokemonGlobal.rockclimbing=true
  Kernel.pbJumpToward
  Kernel.pbUpdateVehicle
  loop do
    event.move_down
    terrain=pbGetTerrainTag(event)
    break if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest
    if terrain!=PBTerrain::RockClimb && terrain!=PBTerrain::RockCrest || $PokemonGlobal.rockclimbing=false
#      Kernel.pbJumpToward(1,false,true)
       break
    end
  end
  event.through=oldthrough
  event.move_speed=oldmovespeed
  $game_map.autoplayAsCue
  $game_player.increase_steps
end
#-----#


#==========#
def Kernel.pbRockClimb
  if $DEBUG ||
    (HIDDENMOVESCOUNTBADGES ? $Trainer.numbadges>=BADGEFORROCKCLIMB : $Trainer.badges[BADGEFORROCKCLIMB])
    movefinder=Kernel.pbCheckMove(:ROCKCLIMB)
    if $DEBUG || movefinder
      if Kernel.pbConfirmMessage(_INTL("The wall is very rocky... Would you like to use Rock Climb?"))
        speciesname=!movefinder ? $Trainer.name : movefinder.name
        Kernel.pbMessage(_INTL("{1} used Rock Climb.",speciesname))
        pbHiddenMoveAnimation(movefinder)
        # Only allow descending if enabled.
        if ENABLE_DESCENDING
          case $game_player.direction
          when 2
            pbDescendRock
          when 8
            pbAscendRock
          end
        else
          pbAscendRock
        end
        return true
      end
    else
      Kernel.pbMessage(_INTL("A wall of rock is in front of you."))
    end
  else
    Kernel.pbMessage(_INTL("A wall of rock is in front of you."))
  end
  return false
end
#-----#


#==========#
def Kernel.pbRockClimbAscendFrames
  viewport=Viewport.new(0,0,Graphics.height,Graphics.width)
  viewport.z==99999
  sprite = Sprite.new(viewport)
  if $Trainer.gender==1
    bitmapFileName = sprintf("Graphics/Pictures/Animations/Rock Climb/Rockclimb_Leaf_"+$rc_spriteframe.to_s)
  elsif $Trainer.gender==0
    bitmapFileName = sprintf("Graphics/Pictures/Animations/Rock Climb/Rockclimb_Red_"+$rc_spriteframe.to_s)
  end
  bitmap=pbResolveBitmap(bitmapFileName)
  bitmapFileName=BitmapCache.load_bitmap(bitmap)
  spritewindow = PictureWindow.new(bitmap)
  spritewindow.x=((Graphics.width+9)/2)-(spritewindow.width/2)
  spritewindow.y=((Graphics.height+118)/2)-(spritewindow.height/2)
  pbWait($rc_framewait)
  spritewindow.dispose
end
#-----#


#==========#
Events.onAction+=proc{|sender,e|
  terrain=Kernel.pbFacingTerrainTag
  if terrain==PBTerrain::RockClimb
    Kernel.pbRockClimb
    return
  end
  if terrain==PBTerrain::RockCrest
    # Only allow descending if enabled.
    if ENABLE_DESCENDING
      Kernel.pbRockClimb
    else
      Kernel.pbMessage(_INTL("A wall of rock is in front of you."))
    end
    return
  end
}

HiddenMoveHandlers::CanUseMove.add(:ROCKCLIMB,proc{|move,pkmn|
  if !$DEBUG &&
      !(HIDDENMOVESCOUNTBADGES ? $Trainer.numbadges>=BADGEFORROCKCLIMB : $Trainer.badges[BADGEFORROCKCLIMB])
    Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
    return false
  end
  terrain=Kernel.pbFacingTerrainTag
  if terrain!=PBTerrain::RockClimb
    Kernel.pbMessage(_INTL("Can't use that here."))
    return false
  end
  return true
})

HiddenMoveHandlers::UseMove.add(:ROCKCLIMB,proc{|move,pokemon|
  if !pbHiddenMoveAnimation(pokemon)
    Kernel.pbMessage(_INTL("{1} used {2}.",pokemon.name,PBMoves.getName(move)))
  end
  Kernel.pbAscendRock
  return true
})
#-----#


#==============================================================================#
#     Utilities                                                                #
#==============================================================================#

#==========#
# Since PE v17 changed some of the functions this script utilizes, I use
#  the "Sprite_SurfBase" added in v17 as way to check the version.
def pbCheckEssentialsVer
  if defined?(Sprite_SurfBase)  #For PE v17+
    $essentialsVer = true
  else    #For PE v16-
    $essentialsVer = false
  end
end
#-----#


#==========#
# *Overwrites these functions locally to add the Rock Climb section.
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.rockclimbing
      $game_player.character_name=pbGetPlayerCharset(meta,3) # Rock Climb graphic
    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
#-----#


#==========#
class Game_Player
  attr_accessor :opacity
end
#-----#


#==========#
# *Overwrites these functions locally to add the Rock Climb section.
class Game_Map
  def playerPassable?(x, y, d, self_event = nil)
    bit = (1 << (d / 2 - 1)) & 0x0f
    pbCheckEssentialsVer
    if $essentialsVer #For PE v17+
      for i in [2, 1, 0]
        tile_id = data[x, y, i]
        # Ignore bridge tiles if not on a bridge
        next if $PokemonGlobal && $PokemonGlobal.bridge==0 &&
           tile_id && PBTerrain.isBridge?(@terrain_tags[tile_id])
        if tile_id == nil
          return false
        # Make water tiles passable if player is surfing
        elsif $PokemonGlobal.surfing &&
           PBTerrain.isPassableWater?(@terrain_tags[tile_id])
          return true
        # Make Rock Climb tiles passable if player is Rock Climbing
        elsif $PokemonGlobal.rockclimbing &&
           PBTerrain.isRockTag?(@terrain_tags[tile_id])
          return true
        # Prevent cycling in really tall grass/on ice
        elsif $PokemonGlobal.bicycle &&
           PBTerrain.onlyWalk?(@terrain_tags[tile_id])
          return false
        # Depend on passability of bridge tile if on bridge
        elsif $PokemonGlobal && $PokemonGlobal.bridge>0 &&
           PBTerrain.isBridge?(@terrain_tags[tile_id])
          if @passages[tile_id] & bit != 0 ||
             @passages[tile_id] & 0x0f == 0x0f
            return false
          else
            return true
          end
        # Regular passability checks
        elsif @terrain_tags[tile_id]!=PBTerrain::Neutral
          if @passages[tile_id] & bit != 0 ||
             @passages[tile_id] & 0x0f == 0x0f
            return false
          elsif @priorities[tile_id] == 0
            return true
          end
        end
      end
    else #For PE v16-
      for i in [2, 1, 0]
        tile_id = data[x, y, i]
        # Ignore bridge tiles if not on a bridge
        next if $PokemonGlobal && $PokemonGlobal.bridge==0 &&
           tile_id && PBTerrain.isBridge?(@terrain_tags[tile_id])
        if tile_id == nil
          return false
        # Make water tiles passable if player is surfing
        elsif $PokemonGlobal.surfing &&
           PBTerrain.isPassableWater?(@terrain_tags[tile_id])
          return true
        # Make Rock Climb tiles passable if player is Rock Climbing
        elsif $PokemonGlobal.rockclimbing &&
           PBTerrain.isRockTag?(@terrain_tags[tile_id])
          return true
        # Prevent cycling in really tall grass/on ice
        elsif $PokemonGlobal.bicycle &&
           PBTerrain.onlyWalk?(@terrain_tags[tile_id])
          return false
        # Depend on passability of bridge tile if on bridge
        elsif $PokemonGlobal && $PokemonGlobal.bridge>0 &&
           PBTerrain.isBridge?(@terrain_tags[tile_id])
          if @passages[tile_id] & bit != 0 ||
             @passages[tile_id] & 0x0f == 0x0f
            return false
          else
            return true
          end
        # Regular passability checks
        else #if @terrain_tags[tile_id]!=PBTerrain::Neutral
          if @passages[tile_id] & bit != 0 ||
             @passages[tile_id] & 0x0f == 0x0f
            return false
          elsif @priorities[tile_id] == 0
            return true
          end
        end
      end
    end
    return true
  end
end
#-----#


#==========#
# *Overwrites these functions locally to add the Rock Climb check.
class Game_Player
  def character_name
    if !@defaultCharacterName
      @defaultCharacterName=""
    end
    if @defaultCharacterName!=""
      return @defaultCharacterName
    end
    if !moving? && !@move_route_forcing && $PokemonGlobal
      meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
      if $PokemonGlobal.playerID>=0 && meta && 
            !$PokemonGlobal.bicycle && !$PokemonGlobal.diving &&
            !$PokemonGlobal.surfing && !$PokemonGlobal.rockclimbing
        if meta[4] && meta[4]!="" && Input.dir4!=0 && passable?(@x,@y,Input.dir4) && pbCanRun?
          # Display running character sprite
          @character_name=pbGetPlayerCharset(meta,4)
        else
          # Display normal character sprite 
          @character_name=pbGetPlayerCharset(meta,1)
        end
      end
    end
    return @character_name
  end
end
#-----#


#==========#
# *Overwrites the base function to removes the windowbox bg for this script.
class SpriteWindow_Base < SpriteWindow
  def __setWindowskin(skin)
    if !$ud_hideWindowskin
      if skin && (skin.width==192 && skin.height==128) ||  # RPGXP Windowskin
                 (skin.width==128 && skin.height==128)     # RPGVX Windowskin
        self.skinformat=0
      else
        self.skinformat=1
      end
      self.windowskin=skin
    end
  end
end
#-----#
#==============================================================================#
#//////////////////////////////////////////////////////////////////////////////#
#==============================================================================#
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Update Released:

v1.1:
- The script now includes a standalone already-set-up Rock Climbing HM compatible with both PE v16 and v17+.
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Hey! I really want to add but i try to install the move with tutorial and stop in 'in Game_Map_' :/ im usin v17.2 and i dont see that title usin ctrl shift f. How can i do?

Ty ty!
Can you give me the exact error message please...?
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Oh, i mean, i try to add Rock Climb with that link (https://www.pokecommunity.com/showthread.php?t=248014) but idk where is 'Game_Map_' and 'Walk_Run' scripts into v17.2 :/ i stop in there lol cuz idk where i find. im newbie, sorry,
You don't need to use that script anymore. Its very old. This resource now comes with Rock Climb already set up.

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 6 Hours Ago
670 posts
1 Years
You don't need to use that script anymore. Its very old. This resource now comes with Rock Climb already set up.
AI SIM!

So, i "plug and play". Edit to terrain tag 17 and 18. Paste the folder

When im play the game and talk with rock, and USE the move, appears this:

---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 17.2]

Exception: TypeError

Message: cannot convert nil into String

Compiler:644:in `+'

Compiler:644:in `canonicalize'

Compiler:642:in `each'

Compiler:642:in `canonicalize'

BitmapCache:372:in `load_bitmap'

====UlithiumRockClimb:236:in `pbRockClimbAscendFrames'

====UlithiumRockClimb:120:in `pbAscendRock'

====UlithiumRockClimb:210:in `pbRockClimb'

====UlithiumRockClimb:250

====UlithiumRockClimb:247:in `call'
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
AI SIM!

So, i "plug and play". Edit to terrain tag 17 and 18. Paste the folder

When im play the game and talk with rock, and USE the move, appears this:

---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 17.2]

Exception: TypeError

Message: cannot convert nil into String

Compiler:644:in `+'

Compiler:644:in `canonicalize'

Compiler:642:in `each'

Compiler:642:in `canonicalize'

BitmapCache:372:in `load_bitmap'

====UlithiumRockClimb:236:in `pbRockClimbAscendFrames'

====UlithiumRockClimb:120:in `pbAscendRock'

====UlithiumRockClimb:210:in `pbRockClimb'

====UlithiumRockClimb:250

====UlithiumRockClimb:247:in `call'
Looks like you didnt install the graphics that came with this resource. Make sure to merge the Graphics folder that came with this resource with yours.

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 6 Hours Ago
670 posts
1 Years
Looks like you didnt install the graphics that came with this resource. Make sure to merge the Graphics folder that came with this resource with yours.
Oh! Its a Autotiles? Or Tilesets, i mean, normal? I merge to my "normal" Tileset, not a autotile.

Ty ty
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Oh! Its a Autotiles? Or Tilesets, i mean, normal? I merge to my "normal" Tileset, not a autotile.

Ty ty
No, no... The GRAPHICS folder that came with this reasource contains all of the pictures used for the animation. From your error message it sounds like you don't have them installed.

WolfPP

Discord: Wolf#1235

Male
Brazil
Seen 1 Hour Ago
Posted 6 Hours Ago
670 posts
1 Years
No, no... The GRAPHICS folder that came with this reasource contains all of the pictures used for the animation. From your error message it sounds like you don't have them installed.
OMG. I paste into Graphics/Animations, not Graphics/Pictures/(make a)Animations/

Really sorry! AND REALLY THANK YOU for you pacience :D :D :D
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
OMG. I paste into Graphics/Animations, not Graphics/Pictures/(make a)Animations/

Really sorry! AND REALLY THANK YOU for you pacience :D :D :D
I just expected everyone to extract the Graphics folder itself, not it's internal contents.

I named the subfolder "Animations" because I intend to make more overworld effects like this one and wanted them all in one joint folder vs. each having their own.
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Ulithium_Dragon
I'm searching where the scripts is to add at the game, but I can't find it.
Where is it, please?
I downloaded the stuff, but I saw only the animation.
"Rock Climb Animation.rb" is the name of the script file. I'm not sure why I didn't just include it in the OP as well, though. I'll fix that.
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
No... the script needs to be manually copy+pasted into your game, like any other script. Open up your project, open the script editor, create a new section, and paste it in there.

Sideways is not supported. Technically speaking, only up is truly supported. You can use down, but there won't be a custom animation for it.
Male
Seen July 2nd, 2019
Posted March 3rd, 2019
18 posts
3.9 Years
So, I need to create a new section on scripts, then paste ALL OF IT there? Like, a section called "Rock Climb", right above the Main section, e paste the whole script there?
And I need to do the same at below "PField_FieldMoves", right? Like create another section, just below that one e and paste all of it again, right?
Doesn't it support sideways? Oh... I guess I'll need to remove my sideways then...

Poq

Seen 1 Day Ago
Posted July 6th, 2019
145 posts
2 Years
So, I need to create a new section on scripts, then paste ALL OF IT there? Like, a section called "Rock Climb", right above the Main section, e paste the whole script there?
And I need to do the same at below "PField_FieldMoves", right? Like create another section, just below that one e and paste all of it again, right?
Doesn't it support sideways? Oh... I guess I'll need to remove my sideways then...
You only need to insert the scripts once. Above Main is the best place to do so, but the key thing is that it does not go before PField_FieldMoves
Male
Seen July 2nd, 2019
Posted March 3rd, 2019
18 posts
3.9 Years
You only need to insert the scripts once. Above Main is the best place to do so, but the key thing is that it does not go before PField_FieldMoves
Gotcha!
I did it! Thank you guys!!
And I added animations going down, too (although it's ugly yet... nothing that some editions won't help...)
Btw, is there any way to set its movement speed while its going up or down?
I did it with the following:

if movementcounter == 7
event.move_speed=6
event.move_up
movementcounter = 0

But it's got strange, getting frameskips...
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Gotcha!
I did it! Thank you guys!!
And I added animations going down, too (although it's ugly yet... nothing that some editions won't help...)
Btw, is there any way to set its movement speed while its going up or down?
I did it with the following:

if movementcounter == 7
event.move_speed=6
event.move_up
movementcounter = 0

But it's got strange, getting frameskips...
The animation I made for this resource uses a rather... awkward workaround. I hide the player's actual sprite and play a picture overlay on top of the screen. This picture overlay is already perfectly synced up with the movement speeds and frame delays so that the player's sprite realigns with the picture overlay when the animation ends.

So if you try to change the movement speed, you're going to break the picture overlay and some frames will be skipped, or rather won't have time to be shown. If you wanted to increase the event speed, you'd need to carefully and meticulously realign the animation speed to match the new event speed. However, I may already be using a frame delay of 1, in which case there's no way to speed up the animation any further without changing how the animation is being created and shown.
Male
Seen July 2nd, 2019
Posted March 3rd, 2019
18 posts
3.9 Years
The animation I made for this resource uses a rather... awkward workaround. I hide the player's actual sprite and play a picture overlay on top of the screen. This picture overlay is already perfectly synced up with the movement speeds and frame delays so that the player's sprite realigns with the picture overlay when the animation ends.

So if you try to change the movement speed, you're going to break the picture overlay and some frames will be skipped, or rather won't have time to be shown. If you wanted to increase the event speed, you'd need to carefully and meticulously realign the animation speed to match the new event speed. However, I may already be using a frame delay of 1, in which case there's no way to speed up the animation any further without changing how the animation is being created and shown.
Got it!
I'll try to make a new animation based on yours (since I'm using different game sprites, I must change its animation sprites... a bit).
Anyway, thanks a lot!
It was a VERY HELPFUL tutorial!
God blesses you! :D
Seen April 10th, 2019
Posted April 10th, 2019
6 posts
3 Years
Hey, I'm using PE v16, and I pasted the script you provided at the top of PField_Encounters, and defined the terrain tags in PBTerrain as
RockClimb = 17
RockCrest = 18

However, I'm getting this error on attempting to playtest:

"Script 'PField_Encounters' line 3: NameError occurred.
uninitialized constant PBTerrain::ROCKCLIMB_TERRAINTAG

Do I need to define the terrain tags further in some way?
Thanks for the help and the awesome resource.
Male
Seen 1 Week Ago
Posted 3 Weeks Ago
112 posts
4.1 Years
Hey, I'm using PE v16, and I pasted the script you provided at the top of PField_Encounters, and defined the terrain tags in PBTerrain as
RockClimb = 17
RockCrest = 18

However, I'm getting this error on attempting to playtest:

"Script 'PField_Encounters' line 3: NameError occurred.
uninitialized constant PBTerrain::ROCKCLIMB_TERRAINTAG

Do I need to define the terrain tags further in some way?
Thanks for the help and the awesome resource.
Hmm, maybe it doesn't like me using constants to assign the tags?

Try changing:
module PBTerrain
  RockClimb = ROCKCLIMB_TERRAINTAG
  RockCrest = ROCKCREST_TERRAINTAG
...to:
module PBTerrain
  RockClimb = 17
  RockCrest = 18
...and see if that fixes it.
Advertiser Content