I am running into something that is confusing the heck out of me, so I am turning to all of you for a hopeful answer.
I have a data file I am loading in my composer framed scene. It contains a table of info.
i load it in and then set another variable equal to it.
local buildingData = require("buildings") local floorEnemiesTotal = {} floorEnemiesTotal = buildingData["building1"].enemies
Over the course of the game, enemies (which is itself a table with sub values) will decrease as the player kills enemies.
The confusing thing is that, when I reload the scene, I check to see the value of the relevant info in buildingData after loading it and it looks like that is decreasing as well, even though I never touch it after loading it in the game.
Does this make sense and, if so, does anyone have an idea as to what I am doing wrong here?
Any help if greatly appreciated.