I'm making a multilevel side scrolling game, and I'm looking for a way to keep data from one level and move it to the next.
For example. Say you pick up a rifle in level 1-2 in exchange for a pistol. But when you transition to level 1-3, how do I keep it so the game remembers that you've picked up the rifle and left the pistol?
Secondly, how can I make it so that the character walks through the beginning of level 1-3, and spawns at the end of level 1-2?