$game_player.step_anime = true
$game_player.step_anime = false
Unfortunately you cannot do that as both are read-only attributes. You have to use this:
Code:
$game_player.instance_variable_set(:@step_anime, true) # or false
$game_player.instance_variable_set(:@move_anime, true) # or false
However, opening the menu should still reset that value.
@Cuddlebuns One thing you could do is adding this to your scripts:
Code:
class Game_Player < Game_Character
alias hrk_update_old_fly_anime update
def update
@step_anime = ($game_switches[7] && (actor == $game_actors[2]))
hrk_update_old_fly_anime
end
end
This sets the stepping animation to true when flight is on. You can set it to true for any vehicle as well, just use "in_boat?", "in_ship?" or "in_airship?" instead of "$game_switches[7]" (I cannot say if that flight switch is related to the airship vehicle so I listed that possibility as well).
EDIT: as a side note, keep in mind that within the Game_CharacterBase class there is no call to step_anime as a method, it is
always used as an instance variable. This makes things more annoying to deal with because a simple alias to the step_anime getter method does not work.
This is the main reason why I changed its value before calling the update method, even so, if you change any of the methods called in the original update method so that they change that value, that one is not guaranteed to work either.
If none of those methods has access to that variable, this one should do the trick.
It's JUST Actor 2. Actor 2 should have step animation on if and only if:
- Actor 2 is the leader and the switch is on
- Actor 2 is a follower and the switch is off
I completely missed this part. Followers automatically copy the stepping animation of the first party member ($game_player). On top of it, the update method for followers does that before calling the update method of the parent class. This means that you cannot solve that with just the code above when actor 2 is not the leader. You need something different.
Code:
class Game_Follower < Game_Character
def update
@move_speed = $game_player.real_move_speed
@transparent = $game_player.transparent
@walk_anime = $game_player.walk_anime
if $game_switches[7]
@step_anime = $game_player.step_anime
else
@step_anime = (actor == $game_actors[2])
end
@direction_fix = $game_player.direction_fix
@opacity = $game_player.opacity
@blend_type = $game_player.blend_type
super
end
end
This might cause compatibility issues if you have other methods that change how the follower update method works. Be sure to place this last one above any other script that changes that.