Whenever I use blocks from the platformer extension by richard, the game always bugs
what’s the bug? can you give me some specifics on what isn’t working?
I just changed the player into a platformer sprite and now the game is blaming the bug on other stuff
Sorry, whenever the game pauses, the game glitches. Like when I press menu, or game over win/lose, or splash screen, etc.
fixed! here’s your project with the version of the extension i just pushed:
Thanks
How did you do it?
if you’re asking how i fixed the bug, here’s the change:
the custom.ts part of that is the only part that actually matters. to figure out what the problem was, i opened the console in my browser and looked at the exception that was being thrown. once i found that and realized it was only happening when the scene changed (all the blocks you mentioned are ones that push a scene on the scene stack), it was pretty obvious what the issue was.
if you’re asking how i updated the version in your project without messing up your blocks code, i used a trick:
- swapped to the javascript editor
- in the file explorer underneath the simulator, clicked the update version button on the extension
- once the editor reloaded, i made an error in the main.ts file
- clicked the blocks button. an error dialog popped up saying that it couldn’t convert my program to blocks
- click the button to skip the decompile and go straight to blocks
in general, i never recommend doing the above to skip the decompiler in your program unless you really know what you’re doing. loading an old blocks file after removing or updating an extension that defines blocks used in that file can cause all sorts of weird bugs. i just happened to know in this case that i didn’t change any of the blocks, so it was safe to do.