RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[SOLVED]A quick script call?

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 71
Entity Humanoid Interface
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
« Last Edit: May 10, 2011, 03:58:38 AM by Aurelia »
I support \\(>O<)b




*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Code: [Select]
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:

Code: [Select]
$game_party.members.size > 0

***
Rep:
Level 71
Entity Humanoid Interface
Totally worked :') This is wicked xD Thankiews ^-^
I support \\(>O<)b