How to set level of entire party by a value

Sait™

Villager
Member
Joined
Apr 7, 2016
Messages
22
Reaction score
5
Primarily Uses
Hi, i'm new to both rpg maker and javascript. I want to set all party member 's level to a value , instant value not increase/decrease. Anyone can help me, plz?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,433
Reaction score
7,712
First Language
German
Primarily Uses
RMMV
Doesn't work that way - you need to set each actor level individually.


If you need that often, then the best way would probably to write a common event that does the neccessary calculations and changes, and simply call that CE whenever you need the effect.
 

Sait™

Villager
Member
Joined
Apr 7, 2016
Messages
22
Reaction score
5
Primarily Uses
thanks @Andar. but i'm new in rpg maker. I know the way to change one actor 's level:
$gameActors.actor(actorId).changeLevel(n, true); . Now i need to know each actorId in my party, or are there other solutions for me?
 

sabao

Veteran
Veteran
Joined
Apr 10, 2012
Messages
832
Reaction score
299
First Language
Filipino
Primarily Uses
RMVXA
Spitballing here, because I'm only still just getting started learning myself, but from what I think I understand, you can use $gameParty.members(), maybe? Something along the lines of... for each $gameParty.member, change their levels? Or acquire the character IDs occupying those fields first?
 
Last edited by a moderator:

Sait™

Villager
Member
Joined
Apr 7, 2016
Messages
22
Reaction score
5
Primarily Uses
Spitballing here, because I'm only still just getting started learning myself, but from what I think I understand, you can use $gameParty.members(), maybe? Something along the lines of... for each $gameParty.member, change their levels? Or acquire the character IDs occupying those fields first?
Thanks for your suggestion, I solved my problem, like this:


for (var j = 0; j < $gameParty.members().length; j++) { $gameParty.members()[j].changeLevel(level, true);};


change "level" to value want to be set.
 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top