[RMMV] Store value into event's id corresponding variable (Help)

Here I am again! But this is gonna be fast.

I remember doing it in Ace using 1 line of code.. 🙂 but forgot how to do it.

And now I'm using MV so...

I just need 2 commands:
  • Store value into event's id corresponding variable. (Ex: If the active event's id is 5, then add/sub/set a value to variable 5.
  • Line of code to use in Conditional Branch checking if variable number [this event id's] is equal/greater.
Just to illustrate, in conditional branch I was thinking on some like this:

$gameVariables($gameMap.event(this._eventId)) == 1

But I don't know how to code.. so please help me 😛

Thanks!
In MV setting the variable that corresponds to the current event looks like this:
Code:
$gameVariables.setValue(this._eventId, 11);
Adding/Substracting from it looks like this:
Code:
$gameVariables.setValue(this._eventId, $gameVariables.value(this._eventId) + 5);
$gameVariables.setValue(this._eventId, $gameVariables.value(this._eventId) - 6);
And checking it on equal/greator in a conditional branch would be:
Code:
$gameVariables.value(this._eventId) == 1
$gameVariables.value(this._eventId) > 1

Glad to help.
In MV setting the variable that corresponds to the current event looks like this:
Code:
$gameVariables.setValue(this._eventId, 11);
Adding/Substracting from it looks like this:
Code:
$gameVariables.setValue(this._eventId, $gameVariables.value(this._eventId) + 5);
$gameVariables.setValue(this._eventId, $gameVariables.value(this._eventId) - 6);
And checking it on equal/greator in a conditional branch would be:
Code:
$gameVariables.value(this._eventId) == 1
$gameVariables.value(this._eventId) > 1

Glad to help.

Just perfect! Everything I needed.

Thanks for the quick reply.

Peace.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-store-value-into-events-id-corresponding-variable-help.119581/