Change party formation with a button press

Canini

Veteran
Veteran
Joined
Mar 29, 2016
Messages
990
Reaction score
662
First Language
Swedish
Primarily Uses
RMVXA
Hello and thanks for looking! I need a really simple (hopefully) script. Say you have a game with two characters, lets call them X and Y. I need a script that changes their formation with the press of a keyboard button (Q). Hopefully these images are clear enough:


X is in front. The player presses the Q button on their keyboard.


Now Y is in front!


If the player presses Q again X returns to the front.

In other words, exactly what the change position in the default menu does but with the press of a button. The party will never have more than two characters.
 

GuanyuMaker

Veteran
Veteran
Joined
Mar 9, 2015
Messages
63
Reaction score
73
First Language
Portuguese
Primarily Uses
RMMV
Is there a vx ace version of this?
Oh. Im so sorry. Missed the thread. I've done something with script calls myself before for vxace but cant remember well how to do it. Basically you need to remove the first party member and add it back, however so long i dont touch vxace that i cant tell you exactly what to do.

EDIT:
I would create a parallel common event and put a conditional inside for the key you want to press for it. Inside the condition a script call with this:

Code:
temp = $game_party.members[0].id
$game_party.remove_actor(temp)
$game_party.add_actor(temp)
Not sure if it will work as I dont have VXACE anymore to test it for you.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
1,845
Reaction score
405
First Language
English
Primarily Uses
RMVXA
If you use Yanfly Party system script, then Soulpour has a fix to allow party swap.
By using script call $game_party.swap_order(n,n)
 

Harosata

Dramatic Lightning's BFF
Veteran
Joined
Aug 20, 2015
Messages
245
Reaction score
69
First Language
English
Primarily Uses
RMVXA
Himework's Rotate Formation, which uses A and S to rotate party formation. Simply #comment out one of the calls on the bottom if you want only one button.
 

Canini

Veteran
Veteran
Joined
Mar 29, 2016
Messages
990
Reaction score
662
First Language
Swedish
Primarily Uses
RMVXA
@Harosata

Exactly what I was looking for! I actually managed to solve it myself by following @GuanyuMaker suggestion and using a common event, but the script should still be super useful for someone else having a set-up like this.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

TFW: You get a text from someone and a long conversation--but you have no idea who this person is and don't wanna be that guy that asks "Who is this by the way?" I have no clue who this person is... but they seem to know me quite well. :rswt
You know, after all these years of using RM I've never played To The Moon. With being busy with life and then after my mom died I was too emotionally fragile to play something that heavy. Has anyone played the Switch version? Is there any big differences between that and the RM version?
Today I finished my Lets Play. Gonna have the videos scheduled for daily uploads now. Woo I finished something ^^
*tries to study Emergence of Bangladesh: Ancient Bengal* Matsyanyayam- When the law of punishment is kept in abeyance... okay what? *searches dictionary* oh! Ok. In abeyance, it gives rise to such disorders as is implied in the proverb of fishes i.e the larger fish swallows a small one- wait fishes eat each other!? Is that like... fishy cannibalism!?...Oh! It's 8:30! Time for dinner! *throws book on floor*
Babbaditch Finster and the Seven-Sided Cube has got to be one of my favorite classic games that didn't exist when I was kid, or ever

Forum statistics

Threads
93,398
Messages
911,983
Members
122,904
Latest member
Vandso
Top