Why is this not working? Thanks!
I think the reset game block at the bottom of the on menu option selected block is causing problems. I pulled that out and the game runs much better, from what I can tell. Maybe you can explain exactly what is going wrong, if that’s not the issue.
P.S… Jaw dropping art.
The reset game block was used to update the images after selling a part and removing it from the “OwnedParts” array (press B to open the menu, then sell part). I removed it and manually called the functions “UpdateStats”, “UpdateSubDisplay”, and “UpdateTextDisplay”. It works fine for a bit, then goes weird again. To be clear, It suddenly says, “are you sure you want to restart?”, which only is supposed to happen when you ask to restart.
I am not completely sure how the BlockMenu extension works, but this is what I noticed. When I started debugging the game, I could open the menu with B, choose various options and eventually close the menu with “Cancel”. However, when I was moving the submarine around, it then started calling the ‘on menu option selected’ block function (I put a breakpoint at the first if statement). In the BlockMenu I noticed there is a ‘set controls enabled’ method. When I added that to the ‘B’ event, I had set that to false, but then I could not move the menu options. I set that method to ‘true’ after opening the menu, and to ‘false’ again when selecting ‘Cancel’.
The menu no longer appears while playing, so I think this may be the fix. Otherwise you could check with @richard, as he made the extension.
BTW: the options when asking to restart are barely visible. Otherwise, again, you have made a really good game and I like how the submarines shoot each other. Being able to select different submarines and parts is quite unique.
It may be how it’s nested in the if statement? I had a hard time with the menu blocks sequences.
Thanks! This really helps! I forgot to add that block.
Yes, I plan to change the palette to fix that.