I am trying to develop a Wall sliding event that works mainly based on Ice sliding.
The concept is the following: If you are facing Down the wall (and if the rock wall permits it) you will slide down the wall till you touch the "grass". Here an image to show it. I will also Attach them at the bottom of the post.
The Event code used is:
The code underlying that I wrote in PField_Field is:
event = $game_player if !event
return if !event
$PokemonGlobal.sliding = true
direction = event.direction
oldwalkanime = event.walk_anime
event.walk_anime = false
break if !PBTerrain.isRock?(pbGetTerrainTag(event))
event.walk_anime = oldwalkanime
$PokemonGlobal.sliding = false
The problem is that the code is based on PBTerrain.isRock?, that I created simply by:
That condition is limiting. I would improve the script by changing it and setting a different IF statement that I can't find a way to define:
IF the tile the player is standing on while sliding is Passable
IF the player is standing in a tile where there is an event, that has as Image a Tileset Tile that is itself Passable and with Priority==0
THEN the player stops sliding
The problem for the First Condition is that while the player is sliding, since I wrote the Event of Sliding in this way , the player has THROUGH ON to slide on Rocks that are normally Non-Passable. Therefore, I can't find a easy way to reconize something Passable or not when the player is Through On.
The problem with the second condition is similar and I also don't know how to recall the properties of the Tileset's Tile that the Stop Event has.
Would someone be that kind and gentle to give me a hand?
Thank you in advance for your attention :)
You need to add a new code inside 'PField_Field' script, into this code (make another 'elsif' below 'elsif PBTerrain.isIce?(currentTag) && !$PokemonGlobal.sliding'):
# Show grass rustle animation, and auto-move the player over waterfalls and ice
event = e # Get the event affected by field movement
currentTag = pbGetTerrainTag(event)
if PBTerrain.isJustGrass?(pbGetTerrainTag(event,true)) && event.character_name != "nil"
# Descend waterfall, but only if this event is the player
elsif PBTerrain.isIce?(currentTag) && !$PokemonGlobal.sliding
elsif PBTerrain.isRock?(currentTag) && !$PokemonGlobal.slidingKernel.pbSlideOnRock(event)
If you are using Following Pokemon Script and want the pokemon be static (no animation) if you are sliding on the rock, find 'def update_stepping' inside Following Pokemon Script and add the lines:
currentTag = pbGetTerrainTag($game_player)
return if PBTerrain.isRock?(currentTag)
Thanks a lot :) But, as you have seen in my Game jam entry (Circular Knowledge), the sliding wall is already been implemented and fully functional. Not the best method but it works perfectly. I didn't post the solution here since there wasn't any interest towards this topic from the community. It is a very specific feature afterall. Thanks again for the help!
If anyone is really interested in this feature, just tell me and I'll wrote a tutorial :)