The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Infinate X on June 08, 2011, 07:48:23 PM

Title: Actor ID from Party ID
Post by: Infinate X on June 08, 2011, 07:48:23 PM
I tried to make this script already but I haven't taken enough tutorials so I couldn't... <_<


I want a script that controls variable 10 (changable through script) when a party members ID is given through script call. Basicly the the variable is set to know the actor ID of the selected party member. I currently need the script for a newley thought of feature in my game, Terramon (readable in it's thread), but I will need it for more things.

It should be compatable with modern algebra's menu script PECMS

Please reply at http://www.omega-dev.net/forums/showthread.php?tid=1133
Title: Re: Actor ID from Party ID
Post by: pacdiggity on June 08, 2011, 08:35:48 PM
variable = 10
member = 1
$game_variables[variable] = $game_party.members[member].id
That should do it. Just use that script call in an event to check it.
Title: Re: Actor ID from Party ID
Post by: Infinate X on June 09, 2011, 12:05:30 AM
... I just checked my request at omegadev and the exact same script was made but with 4 lines instead of 3... the 4th was $game_party.members[member].id...

Did you write it or find it?


EDIT:
Nvm... his says party_member instead of member...



EDIT2: I was about to ask if it was script call but I realized it is...
Title: Re: Actor ID from Party ID
Post by: pacdiggity on June 09, 2011, 07:18:48 AM
They both do the same thing.
He split up the 3rd and 4th lines, I don't know why, but if you read it it's the same. The difference between member and party_member is just the name, it doesn't change a thing. Yeah I wrote it, but so did he.
It's well known among scripters that to make a variable equal something you use $game_variables[VARIABLE_ID] = whatever, and to reference the actor's ID you just need to use that global, $game_party.members[ACTOR_ID].id. Doesn't do anything different.
Title: Re: Actor ID from Party ID
Post by: modern algebra on June 09, 2011, 11:45:53 AM
Well, you have to spit the 3rd line into two to make it fit in a Script call. But pasting yours in there will do it automatically.
Title: Re: Actor ID from Party ID
Post by: pacdiggity on June 09, 2011, 01:08:01 PM
Urr, I wasn't on a computer with VX at the time. I forgot how limiting the script call box was in terms of size.
Title: Re: Actor ID from Party ID
Post by: TheRealDeal on June 09, 2011, 08:39:04 PM
Will this also work/ can this be done in XP?
Title: Re: Actor ID from Party ID
Post by: modern algebra on June 09, 2011, 08:55:05 PM
It would be $game_party.actors in RMXP if I recall, but otherwise the same.
Title: Re: Actor ID from Party ID
Post by: TheRealDeal on June 10, 2011, 12:33:13 AM
Excellent. Thank you!
Title: Re: Actor ID from Party ID
Post by: Infinate X on June 12, 2011, 01:18:42 AM
I tried this with PECMS and I couldn't make it automaticly know which actor was selected to be released. Party Member selection doesn't seem to work with this script call. Also, the reason I like IMP1's better is because of how it was written... party_member seems better to me then member... Idk y...