(MV) Referencing party position in a formula?

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
Probably the wrong section to ask, but given that it's for non-plugin, in-engine use I'm not sure where else to put it.


I haven't been able to find mention of what term would be used for what position in the party an actor is(as in 1st, 2nd, 3rd or 4th, by default) for MV. Does anyone know off hand?


edit: Oh that hateful blue message... 
 
Last edited by a moderator:

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Post this in a Help subforum for the approrpriate Maker - because the answer will be different in every single Maker.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
MV Support is what you want for non-plugin related questions for RMMV.


$gameParty.members().indexOf($gameActors.actor(id))


will tell you their position in the party.  The leader will be 0.  So if you want the leader to return position 1, it will be:


$gameParty.members().indexOf($gameActors.actor(id)) + 1


indexOf will return -1 if that actor is not in the party (so if you're doing +1, a result of 0 would indicate the actor isn't in the party).


$gameParty.members() returns a different list depending on whether you're in battle or not.  If you're running it in battle, it will only give you the battle members (first 4, by default), but if you're running it out of battle it will include all the non-battle members as well.
 
Last edited by a moderator:

Shion Kreth

White Knight
Veteran
Joined
Jan 28, 2013
Messages
281
Reaction score
47
First Language
English
Primarily Uses
Thanks for the pointers, Shaz(weird not having you moving my posts ;)). I'm not good with technical stuff so I'm unsure if I used the right terminology when asking... I just want to know how to reference party position in a formula for, say, a skill or item(and on trying to look formula stuff up seems right, i just can't quite figure out how to utilize it correctly). Like: if actor is position 1 tgr = 300, position 2 tgr = 200, position 4 tgr =50. Someone helped me do this in ace and it seemed like a much simpler affair..
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,354
Reaction score
8,533
First Language
English
Primarily Uses
RMMV
I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Pine Towers

Knight Hospitaller
Veteran
Joined
Nov 11, 2015
Messages
467
Reaction score
226
First Language
Portuguese
Primarily Uses
RMMV
$gameParty.members().indexOf($gameActors.actor(id))
Thank you. This can be used on the editor for plenty of things I have on my mind...  ;)
 

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,047
Members
137,569
Latest member
Shtelsky
Top