Exactly. If you don't need to save it, just use the fact that it is possible to add anything to any object: not only functions but also tables or any datatype. In your case, the game since you want it to persist accross maps.
Something like this:
It will also work by using savegame variables (game:get/set_value()), but this is overkill if you don't actually need to save the information.
Something like this:
Code Select
game.companion_info = {
x_from_hero = 0,
y_from_hero = 0,
}
It will also work by using savegame variables (game:get/set_value()), but this is overkill if you don't actually need to save the information.