04-04-2026, 02:02 AM
For a lark, here is an example script that makes all the following party members face the same direction as the player no matter what direction they are moving.
Code:
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. Refer to "$game_party" for the instance of this class.
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Face Down
# id: party member ID
#--------------------------------------------------------------------------
def face_down(id)
#
character = @characters[id] # Get the train 'actor' by ID
character.turn_down # Use Game_Character turn cmd
#
end
#--------------------------------------------------------------------------
# * Face Left
# id: party member ID
#--------------------------------------------------------------------------
def face_left(id)
#
character = @characters[id] # Get the train 'actor' by ID
character.turn_left # Use Game_Character turn cmd
#
end
#--------------------------------------------------------------------------
# * Face Right
# id: party member ID
#--------------------------------------------------------------------------
def face_right(id)
#
character = @characters[id] # Get the train 'actor' by ID
character.turn_right # Use Game_Character turn cmd
#
end
#--------------------------------------------------------------------------
# * Face Up
# id: party member ID
#--------------------------------------------------------------------------
def face_up(id)
#
character = @characters[id] # Get the train 'actor' by ID
character.turn_up # Use Game_Character turn cmd
#
end
end
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
# This class deals with characters. It's used as a superclass for the
# Game_Player and Game_Event classes.
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
alias game_char_all_party_faces update
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
#
if self.is_a?(Game_Player) # If testing the player
change_facing(@direction) # Change facing on player dir
end
game_char_all_party_faces # Perform the original call
#
end
#--------------------------------------------------------------------------
# * Change facing direction of party members
# facing : player facing direction
#--------------------------------------------------------------------------
def change_facing(facing)
#
for actor in 0..2 # Cycle through followers
case facing # Branch on player direction
when 2 ; $game_party.face_down(actor) # Run face down for actor
when 4 ; $game_party.face_left(actor) # Run face left for actor
when 6 ; $game_party.face_right(actor) # Run face right for actor
when 8 ; $game_party.face_up(actor) # Run face up for actor
end
end
#
end
end
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)