Basically the problem is that I am trying to do a fade effect yet when I try it does a sim error failed cast on null it is at the very start of my game, any ideas on how to fix it? Here is the link if anyone wants to and has the time https://arcade.makecode.com/S04243-66650-87256-52031
1 Like
it’s this (or the other buttons / events), in addition to the on start:
what’s happening is that the events are all referencing things that are not defined until startup / variables functions; since you put those in the ‘after 500 do’ e.g. mySprite
won’t exist for the first 500ms. Few options on that; could move those two out of the ‘after 500ms do’ and it will stop crashing, or could keep track of if game is ‘initialized’ with a variable and exit any events if it’s not in the right mode.
1 Like
Thank you so much I will try and fix
1 Like