Change level with item

I want to be able to use an item from the menu which will increase the target actor's level by one.

The event command "Change Level" presumes that I know which actor I want this to work on, but the player can choose any actor. Therefore that command won't work.

I have tried various script calls in a common event and just get the buzzer of doom.
How would I go about this?

Thanks.
I think there's a way to change a variable using an event to a particular actor ID. So I'm thinking a common event like this:

Show Choices: One for each Actor
Set Variable: Actor ID
Change Level: +1, Actor ID

Might be a bit of work to make the choices work right based on who's in the party at the time, but I did something like that with a Curse remover, so it can be done. It's been a while since I've done it, so I can't remember exactly how it's done, but I think there was a text tag for it.
I found this topic, maybe that helps you out.

If that doesn't work, I believe there are also scripts for it. (Search for Rare Candy script)
For cases like this I usually let the item apply an empty state with no icon, which can then be checked in the common event to recognize the target.
This doesn't solve the fact the common event throws you out of the menu of course, so using a script might be more fitting. 🙂

The buzzer usually appears then the item you are using has apparently no effect on the target. I can't look it up but I'm quite sure that triggering a common event was enough to qualify the item as effective... ^^
Could be wrong here though.
@shockra I really, really want to avoid using a 'Show Choices' if I can, I think it looks quite clumsy for something like this which is why I'm searching for a way to use the item in the same seamless way that the engine does automatically for a potion, or whatever. But thank you for the suggestion.

@slimmmeiske2 That topic looks exactly like what I need, thank you

EDIT
@Another Fen You posted while I was typing my reply. I think slimmmeiske2's suggestion will sort me out. If it doesn't then I'll try out the state route and see where that gets me. Thanks.
This exact problem is why I made my level increasing items just affect all actors, as I couldn't find a workaround. Though I thought I saw a script by someone (Hime?) to get around this somehow, but I might be mistaken.
On my phone at work, so I can't look anything up. If memory serves:

b.increase_level

As a damage formula should do it.

There are other methods, but I don't remember their arguments...
@bgillisp This now works perfectly. For your info (should you ever want to know this again)

In the damage formula put $game_variables[id] = b.id; 0
putting in the id of the variable you have allocated to this.
Have the item also call a common event.

In the common event use the Change level command. For the actor choose Variable and select the one you've allocated.
Pick the number of levels you want.
Done.

@Rinobi You posted just as I was typing this reply. As you can see I have something which works, but I shall try out your option as well so that I have more than one way of doing it should I ever need it.
Thank you
$game_party.target_actor
grabs the selected actor, IIRC.

no need to grab the target actor through the damage formula, you can just apply the dummy item with a common event after it, and the event will process whatever choice you make.
@gstv87 I tried that first. The change level command will not work with just that script call. I think I tried every combination. It needs either a specified actor or a variable.
lvlxp.jpg


.............how do you think the automated command works in reality, grassuhoppah?
@gstv87 If I knew how the automated command works I would not have needed to post this query, now would I? And your screenshot demonstrates amply that $game_party.target_actor on its own is insufficient. Which bears out my experience, and why I needed something else (instead of/as well as).

And grassuhoppah? Really?

Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/change-level-with-item.92065/