Greetings, please help me.
Here I have a Tower Defense game and every time i tried to run the game the app instantly freeze/crash
testing.aia (917.6 KB)
my best guess is something ran infinitely and preventing anything else from running. But, I don't know where to start ;-;
(Canned Reply: ABG - Download those blocks and post them here)
Screen scraped blocks lose resolution and become unreadable.
AI2 generated block images are SVG, which are readable under magnification.
Please download and post each of those event block(s)/procedures here ...
P.S. These blocks can be dragged directly into your Blocks Editor workspace.
See
for how to download individual draggable block images.
You've got a bunch of problems, repeated a lot because of copy/paste.
You have repeated errors of confusing pieces of text with component IDs when feeding components to generic blocks.
You also left Clock Timers enabled in the Designer, leaving open the possibility of them firing before their environment was ready for them. Leave them disabled in the Designer and enable them only when everything else is ready.
A While loop in an event can never wait for something to happen outside that event.
Rethink how this would work, with if/then logic on global variables.
A text JOIN will never give you a component name.
If you want to assign names and types to your components, code some global init tables with component blocks in column 1 and type text in column 2. Likewise for component names, if you need text representation. Use the lookup in pairs list block to map component block into name or type, as needed.
This loop over i does not need an extra block to increment i.
The loop increments i automatically at the bottom.
Other data structures you might consider:
- dictionary with tower slot component as key, and tower occupying that slot as value (or false if unoccupied)
Same error as before, with variable tower_sprite, which will just be a piece of text and never a Sprite component.
This has the same component ID problem as the others.
A global dictionary with Sprite component keys and text type values (Boss/MiniBos,...) would have helped here.

I don't support extensions.
If you want overlap on a Canvas, use Sprite Z values.
Your overall blocks image is too large for the board.
Please note that you can make event blocks generic too, greatly reducing their count.
Here's some samples to study:
(kinda old, before generic events)
Thank you very much for the insight. This is the first time I've done something like this and your replies make me realize a lot more error in my blocks.
Once again, thank you




