Add Actor to Party?

How would I go about the simplest way of adding an actor, whose ID I specify into the party?

I'm working on a simple UI script to recruit actors and was wondering the easiest method of adding the actors

using a variable to specify it's ID into the party. 

Thanks!
The script call to add an actor is:

$game_party.add_actor(actor_id)You can store a variable with the line:

$game_variables[x]=ySo, for example:

$game_variables[4]=8would set variable 4 to a value of 8.

You can combine the two together like so (I think):

$game_party.add_actor($game_variables[x])By the way, you might be interested in this thread: http://forums.rpgmakerweb.com/index.php?/topic/25759-script-call-collection-for-vxace/

It's a collection of script calls to do the equivalent of event commands. I got the line to add an actor to the party from that thread.
Thank you very much for your reply,

I see that I was very close to solving this but i forgot to had the $game_variables[] and instead used the $game_variable's ID and not the actual value.
You can always look at Game_Interpreter to see how it translates the event commands into script calls.


There's also this, which pretty much sums up Game_Interpreter for you.


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.

Original thread: https://forums.rpgmakerweb.com/threads/add-actor-to-party.26318/