Hi everyone,
I’ve semi-successfully found a script that simply changes the player/followers sprites when they are dashing. However, it seems if you hold shift pre-emptively, the script will crash the game. Otherwise, it does exactly what I wanted it to do. It’s a fairly old script, and the original page containing it is lost, so I have attached it to this post.
I am aware of Galv’s character animations and Victor engine’s character control. Galv’s script seems to conflict with one of his own scripts, and Victor’s scripts also conflict with some of my own. Doing this through common events also conflicts with some of the game’s other common events. Modern Algebra wrote a near-identical script, but it's for VX. If possible, it’d be great if someone were able to fix up this small but otherwise perfect script to prevent this error.
I’ve semi-successfully found a script that simply changes the player/followers sprites when they are dashing. However, it seems if you hold shift pre-emptively, the script will crash the game. Otherwise, it does exactly what I wanted it to do. It’s a fairly old script, and the original page containing it is lost, so I have attached it to this post.
I am aware of Galv’s character animations and Victor engine’s character control. Galv’s script seems to conflict with one of his own scripts, and Victor’s scripts also conflict with some of my own. Doing this through common events also conflicts with some of the game’s other common events. Modern Algebra wrote a near-identical script, but it's for VX. If possible, it’d be great if someone were able to fix up this small but otherwise perfect script to prevent this error.
Ruby:
#==============================================================================
# ** Sprite_Character
#------------------------------------------------------------------------------
# This sprite is used to display characters. It observes an instance of the
# Game_Character class and automatically changes sprite state.
#==============================================================================
class Game_Follower < Game_Character
def dash?
$game_player.dash?
end
def real_move_speed
$game_player.real_move_speed
end
end
class Sprite_Character < Sprite_Base
#--------------------------------------------------------------------------
# * OVERWRITE Update Transfer Origin Bitmap
# Still "works" if this was aliased instead but the sprite graphic
# would flash, since it would change to the default/non prefixed graphic
# then back to the the one with the prefix.
#--------------------------------------------------------------------------
def update_bitmap
update_dash
if graphic_changed?
@tile_id = @character.tile_id
@character_name = @character.character_name if [email protected]?
@character_index = @character.character_index
if @tile_id > 0
set_tile_bitmap
else
set_character_bitmap
end
end
end
#--------------------------------------------------------------------------
# * Adds "_dash" prefix to sprite if dashing
#--------------------------------------------------------------------------
def update_dash
return unless @character.moving?
return unless @character.dash?
@character_name = @character.character_name + "_dash"
end
end