Really need help with SRDActorSelect and add and remove actor script.

Really need help with SRDActorSelect and add and remove script. I've been struggling with this for days. I'm no programmer and I have been on the internut, and still have no clue. I've managed to get one character out of four to load on screen, but have no idea on how to choose one of the other three as main actor. I'm using an event, which is touched by player. I really need someone to guide me through this, with some sort of script etc. Thanks
Please post a link to the pluginand show us how you've got things set up and what event commands, plugin parameters, plugin calls you are using.

This is in my event:

◆Plugin Command:OpenActorSelect 2
◆Text:None, Window, Bottom
: :The Actor is \n[\v[2]]
◆Show Choices:Change, No (Window, Right, #1, #2)
:When Change
◆If:Myth1 is in the party
◆Change Party Member:Remove Myth4
◆Change Party Member:Remove Myth3
◆Change Party Member:Remove Myth1
◆Change Party Member:Add Myth2
◆If:Myth2 is in the party
◆Change Party Member:Remove Myth1
◆Change Party Member:Remove Myth2
◆Change Party Member:Remove Myth2
◆Change Party Member:Add Myth3
◆
:End
◆
Is that a screenshot? If it isn't please post a screenshot. Where is the other End statement.

And the link to the plugin.
What link are you refering to? The internet one or the program?
The link to the plugin - where did you get it from?

Your event is very strange. It looks like you only have one person in the party at a time, and you swap them around. But I don't think the logic is right.

Can you explain what is meant to happen?

You are saying if Myth1 is in the party, to remove everyone, including Myth1, and add Myth2. Then you are saying if Myth2 is in the party, remove everyone, including Myth2 and add Myth3.

This means, if you start with Myth1, everyone will get removed and Myth2 will be added, then immediately Myth2 will be removed and Myth3 will be added.

After that, touching the event will have no effect at all, because Myth1 is no longer in the party, so no swapping will be done.

What is this meant to accomplish?

Should some of that be in an Else statement? You only want to swap Myth2 for Myth3 if you haven't just swapped Myth1 for Myth2?

Also in that second group, you have removed Myth2 twice.

But if you only have one party member, and your condition is Party Member X is in the party, why is there any need to remove everyone except that party member?

I think you need to explain what your party setup is, and how they are being swapped, because the logic in the event is not right but I don't know what you're trying to achieve, so can't tell you how to do it correctly.

What I'm trying to do is this.

I have four actors. I want to select any one of them as the main player, yes or no option. The one chosen now becomes the main player, and the others are no longer relevant. I'm aware the logic is not good, hence the need for help.
So are you trying to make the selected actor the leader of the party, with the other 3 following, or are you trying to make them the ONLY actor in the party? How many actors do you have altogether, and how many can be in the party at once?

It does not appear that you are even using the result of the plugin call.
The only actor in the party. None following. There isn't enough instructions for the plug in use.
The plugin just puts the actor id into a variable. That's it. You don't "use" the plugin in any other way. But you "use" the variable any way you want to.

So you call the plugin to let the player select which actor they want, then you add that actor to the party and make sure they're the only one? Try this ...

Code:
Plugin Command: OpenActorSelect 2
Text: The Actor is \n[\v[2]]
Show Choices: Change, No
  When Change
    Script: $gameParty.removeActor($gameParty.leader());
          : $gameParty.addActor($gameActors.actor($gameVariables.value(2)));
  When No
End

You could do it using event commands without script commands, but it would involve a whole heap of conditional branches to see who is in the party and remove them, followed by a whole heap of conditional branches to see what the variable is and add the correct actor.

This will not initialize your actors, and it may give an error if you try to use it without initializing anyone. So create a new event on your very first map that is set to parallel process, which does a Change Party Member to add every character, and check the Initialize box, and then does a Change Party Member to remove every character, and finally turns on a self switch. Give it a second page conditioned by that self switch with no other changes to that page. This will initialize all of your actors just once, but leave you with an empty party. Then you can do whatever you need to add whoever you need, before you get to the first crystal event.

Let us know how you go with the above.
Cannot read property is Alive of null.

Check what Initalize box?
Moved to: Javascript/Plugin Support
You still have not given a link to the web page where you got the plugin. Please do that so that if people need to check something before giving advice, they don't have to spend their time hunting around the internet for it.
Thanks.
It's in post #7 @Kes

Can you please hit F8 when you get that error, then go to the Console tab, and grab a screenshot of that?

And did you do the event where you add all the party members, then remove them again? Or do you get this error without doing that event? If you haven't done that event yet, please do it, as the error might be the exact thing I said might give an error. The Change Party Members event command has the Initialize box.
Oops, sorry, missed that link. I thought it would be put in the opening post.
Apologies.
Screenshot attached.
That is the Elements tab. Could you please screenshot the Console tab? It has the error messages.

But first, do that event where you add then remove the party members to initialize them.

Actually it might just be easier if you zip up your project and send it to me.
Or you could create it yourself, and you could send it to me? Its just a small simple plain map with just the two events, and plugin. Any of the four characters from the database be ok? It's just for testing purposes. Thanks for your help so far.
If I create it, and it works, it doesn't teach you anything. If you send me yours and I figure out why it's not working, I can explain what's wrong and how to fix it, and you learn 😉
Fair enough. I'll do that.
Just post a link when you have it. I won't be on much longer tonight, but I'll take a look at it tomorrow and get back to you.

Original thread: https://forums.rpgmakerweb.com/threads/really-need-help-with-srdactorselect-and-add-and-remove-actor-script.116958/