How to lock a party member?

In the game I'm working on, I want it so that once you get a certain character, she is set to the first position and can't be changed.

Is there a way to do that?

Thank you!
Add the following script to a new slot in Materials:

class Game_Party def fix_position(index) @fixed_position = index end def fixed_position?(index) @fixed_position == index endendclass Scene_Menu < Scene_MenuBase alias shaz_fix_position_on_formation_ok on_formation_ok def on_formation_ok if $game_party.fixed_position?(@status_window.index) Sound.play_buzzer else shaz_fix_position_on_formation_ok end endendNow in your events, after the line where you add the actor to your party, do the following in a Call Script event command (last command on third tab):

Code:
$game_party.swap_order(0,$game_actors[id].index)$game_party.fix_position(0)
where id is the actor id of your new party member.I have not tested this, so let me know if you get any errors trying to run it. What SHOULD happen is that you'll add the character to your party, call the swap to make them the first party member, and then call the new party method to fix the actor in position 1. After that, when you go into the Formation menu, if you try to select the first actor, either as the first option or the second, it should not let you do it.

Moving to RGSS3 Script Requests
What is a Call Script? It that a part of the full Script?
No - it's an event command. Add a new event command to your event, click on the third tab, and look at the bottom of the second column. The very last command is called 'Call Script'.


I removed the quote from your post. You don't need to quote someone if you're replying directly after them, and if you DO quote them, you should remove anything unrelated to what you're about to say. 😉
No - it's an event command. Add a new event command to your event, click on the third tab, and look at the bottom of the second column. The very last command is called 'Call Script'.

I removed the quote from your post. You don't need to quote someone if you're replying directly after them, and if you DO quote them, you should remove anything unrelated to what you're about to say. 😉
Ok, I tried it but it doesn't work. she still moves to the second spot.

BTW, i'm also using the Yanfly Party System Script found here:

http://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/
That would have been a good clue to start off with 🙂


Hopefully someone will come along who's familiar with that script. I just don't have the time to look into it, and I assumed you were using RTP.
Ok, I tried it but it doesn't work. she still moves to the second spot.

BTW, i'm also using the Yanfly Party System Script found here:

http://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/
That script overrides the original formation menu, that's why Shaz solution didn't work - and why it was not neccessary.

Yanfly's party system already has a lock command build-in, and you need to use that command to lock the party position.

The description pictures on the linked page show that lock command being used in the actor notes, so try that first.

If it doesn't work for an actor that is added later, you'll need another command being used in a script call like Shaz explained. I haven't checked the script myself, but usually yanfly adds such options as well, so just read through the script's description in the comments at the start, those usually tell you all options available in the script.
That script overrides the original formation menu, that's why Shaz solution didn't work - and why it was not neccessary.

Yanfly's party system already has a lock command build-in, and you need to use that command to lock the party position.

The description pictures on the linked page show that lock command being used in the actor notes, so try that first.

If it doesn't work for an actor that is added later, you'll need another command being used in a script call like Shaz explained. I haven't checked the script myself, but usually yanfly adds such options as well, so just read through the script's description in the comments at the start, those usually tell you all options available in the script.
Yeah, I tried the "lock_actor(x)" call Script but it doesn't work for some reason.
Did you try setting it in the notes?


You should remove that script I gave you too, btw.
If i dont bad remember,modern algebra did a script that does what do you want,search in rmrk.net.

Excuse me for my bad English.
Did you try setting it in the notes?

You should remove that script I gave you too, btw.
In the notes? I thought you put it in a Call Script.

Also, i did remove the script you gave me.

I really appreciate it, though! 
Yanfly's party system already has a lock command build-in, and you need to use that command to lock the party position.


The description pictures on the linked page show that lock command being used in the actor notes, so try that first.
You need to read the comments at the top of Yanfly's script. Andar is saying you set it up via notes, not via a Call Script.
You need to read the comments at the top of Yanfly's script. Andar is saying you set it up via notes, not via a Call Script.
i read through the comments on the script and it says to use a Call Script to lock a character, as does the page I got the script from.

I've looked around and it has nothing to do with actor notes. I even tried it and it still didn't work.
You need to read the comments at the top of Yanfly's script. Andar is saying you set it up via notes, not via a Call Script.
Unfortunately I misread the description, it is a script call and not a note.

However, the description also states that the lock command only works if you enable the new party menu, not in the old formation menu - that's probably the reason why it didn't work for you, if you're still using the formation menu.

ALWAYS read the description of any script you enter - a lot of scripts NEED CONFIGURATION, and just putting them in your game without checking those configuration options can cause a lot of problems (for example, if you need to specify a switch to control the script, and the default switch number in the script is already used for something else in your game)
Unfortunately I misread the description, it is a script call and not a note.

However, the description also states that the lock command only works if you enable the new party menu, not in the old formation menu - that's probably the reason why it didn't work for you, if you're still using the formation menu.

ALWAYS read the description of any script you enter - a lot of scripts NEED CONFIGURATION, and just putting them in your game without checking those configuration options can cause a lot of problems (for example, if you need to specify a switch to control the script, and the default switch number in the script is already used for something else in your game)
i think I have the new party menu set up. It's the line that says " ENABLE_MENU = true", right?

I've had it set up since the beginning. It's default is true in the script.
I got it to work but there's a problem i'm having with it.

It locks the character but it locks her in the second position.

How do I keep her lock in the first position?
I got it to work but there's a problem i'm having with it.


It locks the character but it locks her in the second position.


How do I keep her lock in the first position?
That looks like you used a fix on (1) with an array/function that counts beginning with zero.
I didn't check the scripts for this, simply try which position is fixed when you lock to zero

Original thread: https://forums.rpgmakerweb.com/threads/how-to-lock-a-party-member.18081/