So my son and I have created a simple game that works beautifully when testing it within the local Scratch client but when we try to download it from the Scratch site after sharing it/uploading it the alien in our game suddenly can't jump. We assume this means that anyone else who downloads our project and runs from their Scratch client will have the same experience. Any help debugging this appreciated....this is our first project
The script for jumping is just a When Up Arrow Pressed | If Touching Color ? | Change Y 20 | Wait .7 sec | Change Y -20. I can see it running through this script when we press the Up Arrow key but nothing happens (aka no jump and not fun game).
Any help appreciated,
Scratching Our Heads in Seattle
Offline
Hi 2Sensie -
Projects online are running in a Java player module. It has a number of peculiarities of it's own and getting your project to run in it properly can be quite tricky. A lot of people just put "must be downloaded to work properly" in the Project Notes and ignore the whole problem.
But I like my games to work online as well as when downloaded and I will usually take the time to try and work around the bugs and quirks of the Java Player.
Usually, the reason that projects act differently on the web has to do with the timing of things. You may have several scripts all starting on a given Broadcast event (for instance) that really need to act in a certain order. They work fine in Scratch but, because some events happen a little faster or slower online, they don't work right online. You can usually cure these kind of problems by adding short Wait blocks ahead of the events that should happen later.
Also, make sure that when the Green Flag is clicked, the project is initializing properly. That means that all the variables are set to the right starting values, all the sprites are put in the right starting place and so on. Any Forever loops that are checking for a certain variable value should have a short Wait ahead of them to make sure that the variable has time to get set to the right starting value before the Forever loop starts checking it.
And if all else fails, put it up on the web anyway and ask for help! Good luck.
Offline
It's annoying when that happens! I'll check out the code and see. Some blocks don't work online such as the <stop all sounds> and <set size to( )%> anyways, I'll keep u updated.
Maki-Tak
Offline