From 2e3d47975202e7943ad67371f7d1284a751192b1 Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Thu, 9 Dec 2021 23:42:06 +0000 Subject: [PATCH] Added def follower_animation which makes the next Show Animation event command apply to the follower instead --- .../003_Game processing/003_Interpreter.rb | 15 +++++++++++---- .../004_Interpreter_Commands.rb | 14 +++++++++++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Data/Scripts/003_Game processing/003_Interpreter.rb b/Data/Scripts/003_Game processing/003_Interpreter.rb index 7b9194b82..c985fa651 100644 --- a/Data/Scripts/003_Game processing/003_Interpreter.rb +++ b/Data/Scripts/003_Game processing/003_Interpreter.rb @@ -35,7 +35,7 @@ class Interpreter @child_interpreter = nil # child interpreter @branch = {} # branch data @buttonInput = false - end_follower_move_route + end_follower_overrides end #----------------------------------------------------------------------------- # * Event Setup @@ -274,13 +274,20 @@ class Interpreter end def follower_move_route(id = nil) - @follower_move_route_id = id @follower_move_route = true + @follower_move_route_id = id end - def end_follower_move_route - @follower_move_route_id = nil + def follower_animation(id = nil) + @follower_animation = true + @follower_animation_id = id + end + + def end_follower_overrides @follower_move_route = false + @follower_move_route_id = nil + @follower_animation = false + @follower_animation_id = nil end #----------------------------------------------------------------------------- diff --git a/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb b/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb index e0200b0a1..83eadc3aa 100644 --- a/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb +++ b/Data/Scripts/003_Game processing/004_Interpreter_Commands.rb @@ -126,7 +126,7 @@ class Interpreter #----------------------------------------------------------------------------- def command_end @list = nil - end_follower_move_route + end_follower_overrides # If main map event and event ID are valid, unlock event if @main && @event_id > 0 && $game_map.events[@event_id] $game_map.events[@event_id].unlock @@ -727,6 +727,11 @@ class Interpreter #----------------------------------------------------------------------------- def command_207 character = get_character(@parameters[0]) + if @follower_animation + character = Followers.get(@follower_animation_id) + @follower_animation = false + @follower_animation_id = nil + end return true if character.nil? character.animation_id = @parameters[1] return true @@ -743,8 +748,11 @@ class Interpreter #----------------------------------------------------------------------------- def command_209 character = get_character(@parameters[0]) - character = Followers.get(@follower_move_route_id) if @follower_move_route - end_follower_move_route + if @follower_move_route + character = Followers.get(@follower_move_route_id) + @follower_move_route = false + @follower_move_route_id = nil + end return true if character.nil? character.force_move_route(@parameters[1]) return true