How to set level of entire party by a value

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

Original thread: https://forums.rpgmakerweb.com/threads/how-to-set-level-of-entire-party-by-a-value.60220/