Main Menu
  • Welcome to The RPG Maker Resource Kit.

Actor ID from Party ID

Started by Infinate X, June 08, 2011, 07:48:23 PM

0 Members and 1 Guest are viewing this topic.

Infinate X

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

pacdiggity

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.
it's like a metaphor or something i don't know

Infinate X

#2
... 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...

pacdiggity

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.
it's like a metaphor or something i don't know

modern algebra

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.

pacdiggity

#5
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.
it's like a metaphor or something i don't know

TheRealDeal

Will this also work/ can this be done in XP?

modern algebra

It would be $game_party.actors in RMXP if I recall, but otherwise the same.

TheRealDeal


Infinate X

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...