Bug in my game that i don't understand at all

imagen

imagen277×469 40.6 KB

(MODS: No share link because i don’t want to share my game yet. Issue is also completely isolated from the game)

When this function runs in my game, the game immediately freezes. As you can see, i have made sure it does not interfere with other tasks, and the loop only ever splashes “0”. After that, the game keeps running for a few miliseconds and then freezes. It also shouldn’t be running infinitely, and it isn’t since otherwise more things would be splashed. Here’s also a picture of the choices array:

imagen

imagen562×302 23.9 KB

I don’t really know what to do, so i am asking for help in the forums. Thanks in advance.

1 Like

That “includes” block cannot tell the difference between two mini menu elements. It will always think they are the same. You could try using the “get and remove random value” block instead, then you wouldn’t have to worry about including the same option twice. If you add the elements you removed back into the array (or just copied that “set [choices] to…” block into the bottom of the choices function) then the array will not actually lose the elements every time.

2 Likes

Hey, a new issue has came up, which makes me have to share the game.

After getting an upgrade, the game stops spawning enemies and scaling the game, except for heart aliens, this shouldn’t happen since notchoosing is no longer false. Can you also help with this?

What could be happening is that the bossactive variable becomes true as soon as the upgrade time thing appears, since there is code that repels enemy creation when it is true, enemies won’t spawn.

Try setting bossactive to false after the upgrade sequence.

1 Like