Pages: 1
Topic closed
Well, when I tried posting my project (a improved version of a ssb project i made), it was all screwed up. My 'masker" which covered the variable (health) was moved to different location. The buttons when you click them are fine but when you click player vs player and start playing it, the attacks will work but no damage or knockback happens. I don't get it. It works beautifully when I play it on scratch, but when I post it, it's all messed up.
Offline
I've run into a number of glitches that only appeared in the Java version online. It's a tedious process to track them down but that's what you have to try to do. The first step is to try and isolate the problem. Copy your project into another project using Save As, then start removing pieces of the project to make the project smaller. Every time you remove a piece, test the new, smaller project on Scratch and then upload it to the web. Try to make the smallest project you can that shows the problem. Using this process, you should be able to pinpoint exactly what is screwing up. Then, you can either try to find a work-around (another way to code it that works in both environments) or you can put a comment on the Troubleshooting Forum asking for assistance from the Scratch team.
Unfortunately, these sort of problems are not uncommon when a program is being run on multiple platforms. It's good to learn some techniques for dealing with them.
Offline
Oh my god!!!Thanks for the advice. I found it!!!!!
Last edited by randomdude (2008-01-20 16:40:13)
Offline
Wait...I tried fixing but the x and y coordinates keep getting messed for my ground and masker keep getting messed up. What should i do?
Offline
It is very difficult to debug someone else's code from such a confusing statement of the problem. To do debugging, you need
1) a clear statement of what is supposed to happen
2) a clear statement of what happens instead
3) the conditions under which the bug happens
4) the source code for the program, to see why it behaves the way it does.
You have not provided us with any of these, so I don't see how we can help you other with very vague, general advice.
Offline
kevin_karplus wrote:
It is very difficult to debug someone else's code from such a confusing statement of the problem. To do debugging, you need
1) a clear statement of what is supposed to happen
2) a clear statement of what happens instead
3) the conditions under which the bug happens
4) the source code for the program, to see why it behaves the way it does.
You have not provided us with any of these, so I don't see how we can help you other with very vague, general advice.
Oh. Sorry. About that. Well:
1) One sprite called "masker". It is supposed to mask my variables (Health). When the button "Player vs Player" is clicked, the masker is supposed to hide.
2) What happens is that the masker x and y cooridinates are different than what I orignially programmed into the game before it got uploaded.
3)When I open it on Scratch, It works beautifully. But when uploaded, the x and y coordinates are changed.
4) The scripts i put for it are:
<when green flag clicked>
<go to x 11 )y 154)
<show>
<when I receive[ play ]
<hide>
I also have the same problem for my sprite "ground".
1)Ground sprites acts as...ground. Stays one place.
2)The x and y co-ordinates are different then what I orginally programmed before I uploaded it.
3)Works perfectly when played on Scratch, but when uploaded, the co-ordinates are changed.
4)
<when green flag clicked>
<hide>
<go to x 20 )y 20 )
<when I receive[ play ]
<show>
I'll also upload the project if you want to see the whole programming script.
Last edited by randomdude (2008-01-20 18:09:38)
Offline
If you have the "goto x: y: " blocks in the "when greenflag" scripts, then the locations should be the same in both the web and the Squeak interpreters.
One minor difference—the web version runs the greenflag scripts automatically after loading, but Squeak does not. Does the squeak version misbehave if you hit the greenflag? If so, your problem is probably that the locations in the initializing goto blocks are wrong.
Offline
What do you mean by "Squeak". If its the version where you run the program at home to make games etc., then it works fine.
Offline
The downloadable Scratch program is implemented in Squeak, so, yes,that is what I meant.
If you have found a consistent difference between the online and downloaded Scratch interpreters, then please provide a pointer to the scratch source, so that others can look at it and see if the problem is in your code or in the Java-based scratch interpreter.
Offline
Topic closed
Pages: 1