2D Array, Grid-like Level Editor Help.
in
Programming Questions
•
1 year ago
Hello, I hate asking the forum, as I love figuring everything out myself, but I am completely stumped. It may be simple... but here it goes. I wrote a 2D array to create a grid. What I need to do now is select an individual square in the said grid and make it display. I'm trying to create a simple level editor and I think that a 2D array and a grid layout will work perfectly, except that I have no idea how I can achieve what I'm trying to do. I am able to wave my cursor around the screen and have specific squares turn blue, but what I want is the ability to hover over a square, and when clicked, it will stay lit up when I move my cursor. Also, for example, when I am done designing a level with this editor I want to be able to save the level and the only way I would think so is to somehow save which squares in the array are lit up to a text file and then when I load the game, it will load the level the user created. So, if someone could possibly push me in the right way, throw me some reading, anything to help rather than giving me the answer, that'd be AWESOME. If you need any code for what I've all ready written, I'd be happy to supply it. If worst comes to worst and only then, could one of you supply small solutions so that I still may figure it out myself?
Thanks for the help,
TheGamersHaven
Thanks for the help,
TheGamersHaven
1