Re: some bgt issues
Hi,
you declare your ball object inside an if statement. That will make it live only within that particular if statement. So, the main issue is not that BGT would only be able to run sequentially or linearly, or that you would be forced to declare variables in a specific order, but it's that if you declare a variable inside a function, loop, conditional or whatever, the variable is local only for that particular scope. It's usually better to create class instances globally for this reason, and that's why your board array is global.
The other issue is that from a quick glance at your current code, I couldn't see anything in the ball class declaration that would actually create the connection between a new instance of the class and your board array. The class and the array are actually two different things. You might consider creating another global function for spawning balls that would first create the ball instance and then insert_last it into the a rray. It might be slightly different than how the Windows Attack tutorial does it, I can't remember the exact details, but it's the way I usually do it.
Hope this helps,
Lukas
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector