RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Rotate Party From The Map

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 83
プログラマです
Rotate Party From The Map VXA
Version: 1.0
Author: SeMcDun
Date: 2014.09.03

Version History


  • <Version 1.0> 2014.09.03 - Completed

Description


Rotate the order of the party using the Q and W keys while walking around a map.
Faster than opening menus to change formation.
Can be useful if your game has features like;
- NPC says different things depending on who they are talking to.
- Objects can be interacted with differently depending on who touches it.
(Eg. A strong character who can push things.)
(Or, when a warrior interacts with a chest he cannot open it, when a thief interacts with the chest he opens it.)
(Or for a quest, your warrior searches a bookcase but finds nothing. The magician searches the bookcase and finds the quest item "Magical Tome")
^ That kind of thing.

Instructions

Just paste the code below Materials and above Main.

Script


Code: [Select]
#=begin
#===============================================================================
# SeM's Change Party Leader On Map VXA
#
# - v1.0
# By SeMcDun
# Last Update: 2014-09-03
#===============================================================================
# Description;
# Change the party leader while on the map using L and R (Q and W)
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================

class Scene_Map < Scene_Base
 
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  alias scene_map_start_scpl start
  def start
    scene_map_start_scpl
    @switched_char = false
  end # start
 
  alias scene_map_update_scpl update
  def update
    scene_map_update_scpl
   
    if Input.trigger?(:L) || Input.trigger?(:R)
      if @switched_char == false
        # If L or R is being pressed
        @switched_char = true
        if Input.trigger?(:L)
          for i in 0..($game_party.members.size - 2)
            $game_party.swap_order(i, i + 1)
          end
        end # If L
        if Input.trigger?(:R)
          i = $game_party.members.size - 2
          until i == -1
            $game_party.swap_order(i + 1, i)
            i -= 1
          end
         
          #for i in ($game_party.members.size - 2)..0
          #  $game_party.swap_order(i + 1, i)
          #end
        end # If R
       
      end # if not already switched char
    else
      @switched_char = false
    end # input L || R
   
   
   
  end # update
 
end # Scene_Map

#=end

Credit


  • SeMcDun

Support


Leave a message if there's a problem and I'll get back to you when I can.

Known Compatibility Issues

- - -

Terms of Use

Free to use in commercial or non-commercial projects with my name in the creds.

*
The Hero of Rhyme
Rep:
Level 83
( ͡° ͜ʖ ͡°)
2014 Queen of RMRKProject of the Year 20142014 Best RPG Maker User - Story2011 Best Newbie2014 Best RPG Maker User - Creativity2014 Kindest Member2013 Queen of RMRKBronze SS AuthorBronze Writing ReviewerSecret Santa 2013 ParticipantFor taking arms in the name of your breakfast.GOOD!For frequently finding and reporting spam and spam bots2012 Best Yuyubabe Smiley2012 Best RPG Maker User (Creativity);o
- NPC says different things depending on who they are talking to.
- Objects can be interacted with differently depending on who touches it.
(Eg. A strong character who can push things.)
(Or, when a warrior interacts with a chest he cannot open it, when a thief interacts with the chest he opens it.)
(Or for a quest, your warrior searches a bookcase but finds nothing. The magician searches the bookcase and finds the quest item "Magical Tome")
^ That kind of thing.

Okay, this is officially amazing! :gracie: Will save a bit of effort on the eventing side of things and generally makes the game feel more "natural" when you don't have to change orders in a menu. My current game doesn't use formations, but I'm definitely keeping an eye on this one!

+rep
Spoiler for My Games and Art:
ℒℴѵℯ❤


My Artwork Thread

The Lhuvia Tales [Current]

Ambassador [Complete]

The Postman [Complete]

The Wyvern [Complete]

Phoenix Wright: Haunted Turnabout [Complete]

Major Arcana [Cancelled]