Status
Not open for further replies.

narabuster

Villager
Member
Joined
Jun 14, 2015
Messages
9
Reaction score
0
First Language
English
Primarily Uses
I'm here to ask for a script that allows for the player to continue their walking animation when hitting or bumping into a wall (or any impassable object for that matter). By default, the engine stops the PC walking animation when he/she bumps into a wall. I want the PC to continue to walk in place in the face of an impassable object instead of stopping their animation.

Essentially, I want to player to have the idle animation only when I don't give any directional input. Otherwise, even when the player hits the wall, it shouldn't be idle.

I know this kind of topic has been brought up before, but it has been 6 months dead and remained unsolved. I'm not sure if this is easy to script for or not, but I'm pretty sure this is entirely possible. The only other thing I can think of is that this will aid in the creation of Pokemon games for the RPG Maker, since in that game, walking animations continue even when hitting a wall.

Thanks in advance! :)
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
186
First Language
Meowish
Primarily Uses
Not sure what you mean there, by default the actor shouldn't be animating if he/she isn't on the move.

To make your actors start out in animation, you have to make a parallel/auto event at the start of the game, then set the player's moveroute with step anime = on. This way your actor should be always be animated.

edit:

or if you don't want to do it using eventing.

you can go over to game_characterbase in your script editor,

around line 57 you should find

@step_anime = falsechange false to true there and your actors should start with animation.
 
Last edited by a moderator:

narabuster

Villager
Member
Joined
Jun 14, 2015
Messages
9
Reaction score
0
First Language
English
Primarily Uses
@MeowFace

Not sure what you mean there, by default the actor shouldn't be animating if he/she isn't on the move.

To make your actors start out in animation, you have to make a parallel/auto event at the start of the game, then set the player's moveroute with step anime = on. This way your actor should be always be animated.

edit:

or if you don't want to do it using eventing.

you can go over to game_characterbase in your script editor,

around line 57 you should find

@step_anime = falsechange false to true there and your actors should start with animation.
MeowFace, this helps out a lot (thanks :)  ), but there is one problem. My character does the step animation even when he's not being moved. 

So when I don't press any of the arrow/movement keys, he's walking in place. Is there a way to make him stop the step animation when the player is not moving him?

Essentially, when I move the character to hit a wall, he stops his stepping animation even though I am pressing the movement key to the direction against the wall. I wanted him to continue doing the stepping animation, but apparently when a PC is against a wall, it won't do that.

Your help fixed this problem, but now my character is doing the stepping animation even when he's idle. 

Sorry if I wasn't clear on this before  :| .
 

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
186
First Language
Meowish
Primarily Uses
That's what the step animation do, just like what you can normally do with events.

But if you want a step animation that can be turned on/off based on conditions. It will require some work, but still, not one that require a script.

The script call $game_player.moving? is normally used when it comes to checking if the player is moving or not, but in your case, bumping into wall = not moving. So it will not work here. $game_player.stopping? isn't going to work too.

So what's left is to constantly check for button pressed using a common event.

Set up a parallel common event that runs at the start of the game, and have it check if the up down left right button is pressed.

if pressed, turn on step animation. if not, turn off.

If you must use a script to do this:

Paste this in your scrip editor below Material and above Main

Code:
#==============================================================================# ■ Meow Face Wall Bump Step Anime#------------------------------------------------------------------------------# Continue Step Anime when bumping into wall#==============================================================================# How to Use:# [1] Paste This script Below Material and Above Main#==============================================================================class Game_Player < Game_Character  alias meowface_gp_wall_walk_update update  def update    meowface_gp_wall_walk_update    if Input.dir4 >0      @step_anime = true    else      @step_anime = false    end  endend
 

narabuster

Villager
Member
Joined
Jun 14, 2015
Messages
9
Reaction score
0
First Language
English
Primarily Uses
Thanks MeowFace! Your script does just the trick.  :D

I also tried to make the parallel process common event like you said, but somehow, I ended up with my character not being able to move at all no matter which direction I inputted. In the end, I decided to use your script. From looking at it, it seems it does just the same thing as my common event, but it actually works this time.

Case closed.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

unintentionally made a track that sounds straight out of Yume Nikki
Revisiting one of my older projects in a long time to work some more on the mechanics. I've been working on- and off-again for about a year now on recreating the Force and Mystic systems from Wild ARMs. And I think I've finally made some good breakthroughs on that!

Still, it is not perfect and I may post my thoughts at a later time to see if there are any other suggestions or alternatives I've missed.
actor name string, why you gotta be case sensitive like that?
Doing RPG Maker News for 26th October 2021

My entire world, full of monsters and treasures, will likely be done by the end of the year. After that it's all NPCs and side quests... then done. I'm never making an open world game again xD

Forum statistics

Threads
116,106
Messages
1,095,856
Members
151,511
Latest member
jjjjjamjam
Top