I read somewhere that when you set a variable to another like say x = y, all that is done is the path of y is copied to x, so whenever y changes from thatpoint on, they always stay the same. Idk how true that is, but i seem to be getting an issue involving something like that in the game I am making. To check to see if a variable has changed, i just set a variable to the old value of it, or rather what the screen is drawing, and check it with the current. in the init, and in the fix, i just set the current variables to the old storeage ones, so the path is getting copied, so whenever i change the current one, they change with them. sorry if thats confusing, anyone have any idea of how to fix that?
EDIT: So I’ve verified myself that java copies thel ocation of the variable to the other, linking the too, atleast with a string. I need a fix for this though. I tried adding “” to the end, but then it says that the 2 strings are different, when they are exactly the same. I havnt any idea how to fix this, so any help would be great.