Hello, I'd like some help with a problem here I am having.
I am making an attempt in creating a menu with a skill book where you can drag the skills into the skill bar. The bar will save the frame that the icon has into a global variable. The play button will bring you to the game, where you can control your character with the WASD keys, and has a skill bar on the lower part where the icons will have their frames updated. The save button is simply there to test a loading feature I'm going to implement as well so ignore that, but for the curious people, everytime the game runs for now for testing) it loads the saved information.
And no, the music in there is not mine, I just placed it there to give a little bit more of life while testing, I got them from MGQ.
Now the problem started when I managed to make everything work. The variables would save just fine, but changing layout would still let the slots of the skill bar filled up with the first frame of the icon, while in reality it should remove them. I tryed to fiddle around, even giving a blank frame to the icon to see if it could be solved without destroying the icon, but with no avail, it just made things worse, now they won't load properly and I went tilt trying to figure out what is wrong, but after a few minutes I went back to the point where the icons would not dissapear (But don't have anything to make them dissapear at the moment). Here is the .capx to demonstrate what I have done (To test start with the Spell Select layout).
Skill Menu and Skill Bar
I heavily apologize if there are alot of things in there that might get you confused, please focus solely on the layer "Spell Select", it's corresponding event sheet and the Player event sheet where the "Start on Layout" event is, that will set up the skill bar.
And yes, that is amazing artwork that is being used temporarily.
I belive the main problem is because the global variables are returning a "NaN" value whenever they're supposed to be -1, that should be the reason most of the events won't read the variable correctly, otherwise this would've been achieved easily by now, but since it wasn't, I am asking for help in this.
So yeah, I'm not very experienced and I did browse through alot of tutorials to help me in this like RPG Inventory Tutorial by Weishaupt, but the main sole reason my project is different was because I fiddled with the Drag+drop feature, so any feedback would be appreciated.