RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[SOLVED]A quick script call?

Started by Aurelia, May 08, 2011, 05:18:06 PM

0 Members and 2 Guests are viewing this topic.

Aurelia

To store the database ID of the actor who is in slot 1 of the party?


For example, my party consists of B C D A in that order
The actor ID in database:
1. A
2. B
3. C
4. D


In this case, the actor in slot 1 of the party is B, whose corresponding ID is 2
So 2 will be stored into a variable.


Can anyone tell me how to do this? Thanks so much :3
I support \\(>O<)b




modern algebra


actor = $game_party.members[0]
$game_variables[1] = actor.id


Would store the ID of the first actor into variable 1. I split it in two like that since it would otherwise be too long for the script call. If there is no actor in that slot, however, it will return an error, so you may want to place it in a conditional branch which checks if:


$game_party.members.size > 0


Aurelia

Totally worked :') This is wicked xD Thankiews ^-^
I support \\(>O<)b