Save-Point
KharStepOrder VX + ACE - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker VX/VXAce (RGSS2/3) Engines (https://www.save-point.org/forum-117.html)
+---- Thread: KharStepOrder VX + ACE (/thread-9076.html)



KharStepOrder VX + ACE - kyonides - 09-03-2024

KharStepOrder
VX + ACE

by Kyonides

Introduction

This scriptlet allows you to change which character's leg goes first while walking around.
Happy with a sweat Really, that's it!

To change the Game_Character's default option, look for the @@step_order class variable and set it to :left or :right

Change the Current Pattern Order for All Walking Characters in Game:

Code:
Game_Character.step_order = :left OR :right

Script for VX

Code:
# * KharStepOrder VX * #
#   Scripter : Kyonides Arkanthes
#   2024-09-03

# * Game_Character's Default Option * #
# @@step_order = :left OR :right

# * Script Call * #
# - Change the Current Pattern Order for All Walking Characters:
# Game_Character.step_order = :left OR :right

class Game_Character
  @@step_order = :right
  def self.step_order=(order)
    @@step_order = order
  end

  def self.set_step_order
    (@@step_order == :right ? 1 : -1)
  end

  def update_animation
    @leg_order = Game_Character.set_step_order
    speed = @move_speed + (dash? ? 1 : 0)
    if @anime_count > 18 - speed * 2
      if not @step_anime and @stop_count > 0
        @pattern = @original_pattern
      else
        @pattern = (@pattern + @leg_order) % 4
      end
      @anime_count = 0
    end
  end
end


Script for VX ACE

Code:
# * KharStepOrder ACE * #
#   Scripter : Kyonides Arkanthes
#   2024-09-03

# * Game_Character's Default Option * #
# @@step_order = :left OR :right

# * Script Call * #
# - Change the Current Pattern Order for All Walking Characters:
# Game_Character.step_order = :left OR :right

class Game_Character
  @@step_order = :right
  def self.step_order=(order)
    @@step_order = order
  end

  def self.set_step_order
    (@@step_order == :right ? 1 : -1)
  end

  def update_anime_pattern
    @leg_order = Game_Character.set_step_order
    if !@step_anime && @stop_count > 0
      @pattern = @original_pattern
    else
      @pattern = (@pattern + @leg_order) % 4
    end
  end
end

Terms & Conditions

Free for use in ANY game. Gamer
Due credit is mandatory because I say so. Tongue sticking out