Using an event to change party formation?

Status
Not open for further replies.

XViper

RPG Ninja
Member
Joined
Jul 24, 2013
Messages
8
Reaction score
1
First Language
English
Primarily Uses
Hi guys,

First up, I'm new here. So Hi!

Really excited about making my first game. Trying to do something interactive for the kids, seeing if I can put some educational \ learning things in the game too.
I've done a bit of googling and searching on the forums here but couldn't find what I was after.

I did find references to Yanflys Party Formation Script, but I was hoping I could just do this using an event.

All I want to do is change the formation of the party when an event is run.

Example:

Party member #2: "I will lead the way from here"
 

Change formation from 1,2,3

To 2,1,3

Can this be done?

Thanks a lot for any help. :)
I'm sure I'll be asking more questions in the weeks to come.

- XViper

 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Just use a Call Script command (last command on page 3 of the event commands) and do $game_party.swap_order(0, 1) to exchange the first and second characters.


You might need to consider disabling formation in the menu (there's a Change Formation Access command on page 3 as well) so the player can't just go back in and swap them around again.


You may also need to tinker a bit if the player CAN change formation prior to this. Actor 2 may not be in position 2 when this event is run - they might be in position 4 instead. So if you really want to say "swap actor 2 with whoever is in the first slot", it would be more like this:

Code:
$game_party.swap(0, $game_actors[2].index)
 
Last edited by a moderator:

XViper

RPG Ninja
Member
Joined
Jul 24, 2013
Messages
8
Reaction score
1
First Language
English
Primarily Uses
That worked great.
 

Thanks heaps for your quick reply. :)

Not too fussed about changing them back, but I became aware of that ability while trying to find my answer for this one. :)

Edit: Saw your edit. Thanks very much for that, as that may very well occur later down the track. Very helpful to know.
 

Liking this forum already! :thumbsup-right:  

 
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,081
Members
137,582
Latest member
Spartacraft
Top