Why events don't remember its new properties' value?

● ARCHIVED · READ-ONLY
Started by Isabella Ava 7 posts View original ↗
  1. 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
  2. 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).
  3. @fizzly is correct. You'll need a plugin like the one Yanfly has that saves the state of events after you leave the map.
  4. 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.
  5. Hudell said:
    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
  6. 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)
  7. The save file is generated on DataManager.makeSaveContents, you'll probably need to modify it to include your new data on it.