Upper limit to panels created at runtime?Pan_create crashes game

Posted By: tolu619

Upper limit to panels created at runtime?Pan_create crashes game - 06/06/14 20:45

I have a character select screen that dynamically deletes or creates buttons depending on which characters have already been chosen. Seeing as Gamestudio has a pan_setbutton function for adding or modifying buttons at runtime but no function for deleting them, I had to use pan_create to create a different panel for each button, because I can remove each panel at will with ptr_remove.
The problem is that when I create more than five panels, only five of the buttons will be active. The other buttons won't react to the mouse at all. Remember that each panel contains only a single button and nothing else. I have 9 character select buttons at the bottom edge of the screen but only those from the center to the right hand side work. Those on the left don't work. I also noticed that a button created at the top right corner of the screen would work, but only if the mouse is placed over it's right edge. Placing the mouse anywhere else on the button won't do anything.
I am willing to share a Dropbox link to my project folder if one must see all my code to find the problem. These problems never showed up when I used pan_create to create only one or two panels, but now, there's even a button I can't create because the moment I call pan_create for that particular button, the entire game crashes. I can't figure it out because I've checked for typos over and over again and the button uses the exact same kind of code as the other buttons that do work
Posted By: Superku

Re: Upper limit to panels created at runtime?Pan_create crashes game - 06/06/14 20:49

Back in the days I worked with hundreds of dynamically created panels at once with no similar (or pretty much any) problem, the issue most likely has to come from somewhere else.
If it's not too much stuff/ code I can take a look at it, so please provide a dropbox link.
Posted By: tolu619

Re: Upper limit to panels created at runtime?Pan_create crashes game - 06/06/14 21:19

I've sent you a private message. Thanks a lot, you're really helping me a lot with my game. Seriously.
© 2024 lite-C Forums