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.
[RESOLVED] Change Lead Script

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 91
Blah blah blah...
Project of the Month winner for November 2008
Hey guys, I'm looking for a script where if you press L or R (Q/W) you can shift your party position 1 spot forward or backwards. I used this script before and requested it a long time ago (by long time ago i mean crankeye long time ago) and can't seem to find it anymore. I remember it being a really small and simple script so if anyone could come up with one or find one that would be great.

Similar to this guy's post but I'm not using near fantastica's thing.
http://rmrk.net/index.php/topic,5727.0.html
« Last Edit: July 19, 2007, 07:22:47 AM by Zeriab »


- -

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Sure, I'll write one up for you. Give me a second.

EDIT: Okay, Starting now

EDIT 2:

Code: [Select]
class Scene_Map
 
  alias change_leader_modification update
  def update
    change_leader_modification
    if Input.trigger? (Input::R)
      new_lead = $game_party.actors.shift
      $game_party.add_actor (new_lead.id)
    end
    if Input.trigger? (Input::L)
      new_lead = $game_party.actors.pop
      $game_party.actors.unshift (new_lead)
      $game_player.refresh
    end
  end
end
 

Place it just above main
I didn't test it, but it should work. Tell me if you encounter any problems
« Last Edit: August 12, 2007, 03:17:56 AM by modern algebra »

***
Rep:
Level 91
Blah blah blah...
Project of the Month winner for November 2008
Works perfectly fine, thanks. If I do encounter any problems I'll tell you.


- -