Easy question: Storing Actor Id on Party Member position BEYOND 8 party slot.

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
Hi all!!
This should be easy but I dont get the code right.

One can use the Control Variables , Game Data, Party Member 1 through 8 slot to store the actor Id on a variable depending on its position on the party. If I wanted to store the ID for a 9th or 10th player, I should use a script code. What would that code be?
I have:
Code:
$gameVariables.setValue(X,  $gameParty.members()[9].actorId());
But of course, is wrong. Any help?

Thanbks!!
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
71
Primarily Uses
What's the problem with that code, aside from it not getting all members but a list depending on whether you're currently in battle?
 

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
What's the problem with that code, aside from it not getting all members but a list depending on whether you're currently in battle?
Funny, The code is right. The thing is I dont have a party member in slot 9, since party index starts at 0, not 1. If i have an actual member on the slot, it will return the data with no problem.

Thanks for answering though!!
 

cyanic

Veteran
Veteran
Joined
Nov 16, 2015
Messages
106
Reaction score
71
Primarily Uses
Oh, so you just want a placeholder ID instead if you don't have that many members?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top