MV [SOLVED]Need how to know Actor's ID form second party.

Hi. I try to make Invite heros system(or just call catch). so i use Hime's Instance Actors Plugin.
But i use CTB Side view battle system. I can't direct add new heros in to party. So i send it to another party.

Then I need script to know actor's ID of second party.
ask party memberID.png

Becuase I want to Re-name after Invite/Catch heros before end battle.(just like pokemon.)

HIme's Instance actors plugins is copy actor in to second party and then end process.
So
1. I need script to know(access) actorID in second party(character BB and UV in image).
2. I need script to know length of second party to know last actor's ID.(Party length-1)

I success re-name of character in active party. But i still need to make it easy to play.

Thank you.

​

I'm having a very hard time figuring out what you're asking. Your profile says your first language is English - if that's accurate, can you please re-word your question with more complete sentences and accurate terminology?

If your first language isn't English, you should fix that part of your profile - it's there so that people will understand you're translating and work to accommodate you.

So basically...
But i use CTB Side view battle system. I can't direct add new heros in to party.
I don't see what the CTB battle system has to do with adding actors to your party.
So i send it to another party.
This is a huge hole in your question - how? By default, in MV, there's no such thing as "another party," so we can't tell you the code to access actor IDs in it. If you're using a plugin that lets you manage multiple parties, it's really important for you to tell us what it is, because the code would be in there.
HIme's Instance actors plugins is copy actor in to second party and then end process.
Well, no. The Instance Actors just creates a new actor, it doesn't do anything with it. And that script call gives you the actor that you just created, so I'm not sure why you're having a hard time doing things with it.

For example, wherever you're creating the actor, you could do something like:
Code:
var newActor=InstanceManager.addActor();
$gameVariables.setValue(10, newActor.actorId());

and that would store the ID of the new actor into your game's variable 10.

Is that what you're asking?
2. I need script to know length of second party to know last actor's ID.(Party length-1)
Again, there's no way to answer this because I don't know what you're talking about with a second party.
I'm having a very hard time figuring out what you're asking. Your profile says your first language is English - if that's accurate, can you please re-word your question with more complete sentences and accurate terminology?

If your first language isn't English, you should fix that part of your profile - it's there so that people will understand you're translating and work to accommodate you.

So basically...

I don't see what the CTB battle system has to do with adding actors to your party.

This is a huge hole in your question - how? By default, in MV, there's no such thing as "another party," so we can't tell you the code to access actor IDs in it. If you're using a plugin that lets you manage multiple parties, it's really important for you to tell us what it is, because the code would be in there.

Well, no. The Instance Actors just creates a new actor, it doesn't do anything with it. And that script call gives you the actor that you just created, so I'm not sure why you're having a hard time doing things with it.

For example, wherever you're creating the actor, you could do something like:
Code:
var newActor=InstanceManager.addActor();
$gameVariables.setValue(10, newActor.actorId());

and that would store the ID of the new actor into your game's variable 10.

Is that what you're asking?

Again, there's no way to answer this because I don't know what you're talking about with a second party.
Sorry for my bad English. I'm Thai.(Thai language can't use in global, so i enter as English, now I'm fix it ) And beginner on RPGMaker that use java script.

I forgot to mention that i use Hime's Party Switching Scene with Instance Actors plugin.
I use this clip as reference.


This is code i use.

var newActor = InstanceManager.addActor(ActorID);
var party = $gameSystem.reserveParty();
party.addActor(newActor.id) ;

according to my understanding, reserveParty is second party.
That i want to know how to manage it.

1. I need script to know actorID in second party/reserveParty (character BB and UV in image).
2. I need script to know length of second party/reserveParty to know last actor's ID.(Party length-1)

I want to know actorID and position in reserveParty for re-name that character.

I try contrat Hime myself but still don't have reply.

​

This is code i use.

var newActor = InstanceManager.addActor(ActorID);
var party = $gameSystem.reserveParty();
party.addActor(newActor.id) ;
Okay. If all you're doing is adding that new actor to the reserve party, that party variable doesn't have any purpose, but it doesn't hurt anything.
1. I need script to know actorID in second party/reserveParty (character BB and UV in image).
$gameSystem.reserveParty().members() should give you the list of the actors in the party. So the first actor is $gameSystem.reserveParty().members()[0] the next is $gameSystem.reserveParty().members()[1] etc.
2. I need script to know length of second party/reserveParty to know last actor's ID.(Party length-1)
$gameSystem.reserveParty().members().length
I want to know actorID and position in reserveParty for re-name that character.
I don't understand why you need the actor's index in the party to rename them, but there you go.
Okay. If all you're doing is adding that new actor to the reserve party, that party variable doesn't have any purpose, but it doesn't hurt anything.

$gameSystem.reserveParty().members() should give you the list of the actors in the party. So the first actor is $gameSystem.reserveParty().members()[0] the next is $gameSystem.reserveParty().members()[1] etc.

$gameSystem.reserveParty().members().length

I don't understand why you need the actor's index in the party to rename them, but there you go.
Thank you very much. It work.

Original thread: https://forums.rpgmakerweb.com/threads/solved-need-how-to-know-actors-id-form-second-party.149743/