Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
Hi there,
I am using RPGMV, i tried to add new property on some Events like this:
$gameMap.event(2)._test = 1;
$gameMap.event(2)._test += 1;
Then i left the map and come back, now the ._test property's value had been reverted to 0.

How can i make the game remember those value?
Thank you
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
900
Reaction score
582
First Language
Polish
Primarily Uses
RMMV
Not sure If I'm telling the truth but when you leave a map RPG Maker erasing it and then creates a new one (that one you'll entering). So if tests are assigned to events 2 from map X, then after leaving the map events are deleted and then created again (with 0 values).
 

Frogboy

I'm not weak to fire
Veteran
Joined
Apr 19, 2016
Messages
1,834
Reaction score
2,341
First Language
English
Primarily Uses
RMMZ
@fizzly is correct. You'll need a plugin like the one Yanfly has that saves the state of events after you leave the map.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,602
Reaction score
3,837
First Language
Java's Crypt
Primarily Uses
RMMZ
Use $gameMap.event(2).event()._test = 1 instead, that way the information will be stored on $dataMap and will only be lost when you close the game.
 

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
Use $gameMap.event(2).event()._test = 1 instead, that way the information will be stored on $dataMap and will only be lost when you close the game.

Awes..ome! Thank all of you : =) that's all of great info
 

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
hello @Hudell, i want to ask another thing that is, if i want that property to be remained permanently along with the game, is there someway? (it mean when i save game that property should be saved along too i guess)
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,602
Reaction score
3,837
First Language
Java's Crypt
Primarily Uses
RMMZ
The save file is generated on DataManager.makeSaveContents, you'll probably need to modify it to include your new data on it.
 

Latest Threads

Latest Posts

Latest Profile Posts

Tiamat-86 wrote on Andar's profile.
tfw just trying to help and get yelled at. /comfort
:LZSooo: Gotcha Gotcha Games... have launched an official discord server for RPG Maker. :LZSooo:

doodled a poring today :kaoluv:
uc
Fire-Emblem Style Level Up System, Boost on Class Change, And Animated Arrows | RPG Maker News #115

Why keyboards don't sleep? Because they have two shifts.

Forum statistics

Threads
113,945
Messages
1,078,583
Members
148,050
Latest member
dramacoolanetamak
Top