Changing an actor's level to specifically a variable

I'm asking this for a friend. My friend is making a summoner character whose summons are exactly the character's level. There's a "change level", but it's only to add and remove levels, not set the level.
You can add or remove multiple levels at once and control it with a variable
What you can do is store into a variable the summoner's level, then store into another the summon level, take the difference between the two and then use the result to add or remove the levels.
If you're willing to delve into the Script Event Command you can find how to set the level via variable on Archeia's Script Call Collection for VXAce. If you scroll down to the Change Level section there are script calls for both 'new_level' and 'level+value'.
summpon script.png
This is the script my friend is using so far. Red is the summoner actor, blue is the summon actor.
For some reason, the summon is stuck at level 2 no matter what the summoner's level is.
What can I do to fix this?
It is very hard to read what you provided but I believe your code will not work as intended because you try to add the level of an actor to another, so if the summoner is level 20 and the summon level 15, then the summon will reach level 35.

The following event calls will do the trick on a blank project (pardon my french):
1746910710445.png

It boils down to this:
Code:
var = summoner.level
var -= summon.level #store the difference of levels
summon.level += var

This code means that the summon will have the same level as the summoner. If the summoner has lower level, the summon will also lose levels.
You might also want to heal your summon after changing its level otherwise it won't have full hps/mps.

If your summon is stuck to level 2, maybe its max level is 2? Have you checked this value in the actor's page?
the summon is stuck at level 2 no matter what the summoner's level is.
So if PartyMember1[Eric] is Lv1 and PartyMember2[Natalie] is Lv1, then setting variable1 to Eric's Lv1 and adding Natalie's Lv1 would equal 2 so variable1 is applying 2 to your summon not 1. Edit: NVM Timtrack probably nailed that too.
@Timtrack showed a good way of storing the level difference above. Otherwise here're two other methods.
Method1.PNG


Method2.PNG

Original thread: https://forums.rpgmakerweb.com/threads/changing-an-actors-level-to-specifically-a-variable.177561/