I modified a project ("target_practice" by KSMscratchers) and with their permission uploaded my version. Online, the Space key doesn't shoot the arrow.
So I deleted the project, tested it here, then uploaded it again. Same problem.
Then I changed the "shoot" key to the Right Arrow key. Same experience online.
(Sometimes, online, when I press the Space key the effect is to jump down the page! Each press of the Spacekey jumps down farther.)
None of my uploaded projects has had this problem. Any ideas what could be wrong?
Thanks!
Offline
Try clicking on the box where the project appears, then pressing the button. That might work.
Offline
Bloing_Gloing wrote:
Try clicking on the box where the project appears, then pressing the button. That might work.
I went back and tried that again, but no luck. I've stopped all the action, then restarted the program....no luck. I've clicked on the Green Flag even while the project was running....no luck.
The original author downloaded the project to their computer and told me it works fine there. And here at home. Just not online.
Thanks...
Offline
I downloaded the project and tried simplifying it.
At first I thought the problem was with the java implementation not scheduling other events often enough when doing a glide.
But I removed the glides and still got clearly buggy behavior.
There is a simpler debug version of the project at http://www.soe.ucsc.edu/~karplus/scratch_programs/target_practice-KSMscratchers-2-fixed.sb
There seems to be some serious bugs in v15---the normal tricks for making the java iimplementation work did not seem to apply to this project.
Offline
v16, which was just installed, also seems to be broken.
Offline
Is the code:
forever
something
if key space pressed
fire
end if
something
end forever
or
when key space pressed
fire?
The first one always works for me, but the second one doesn't always.
Offline
kevin_karplus wrote:
I downloaded the project and tried simplifying it...
There seems to be some serious bugs in v15---the normal tricks for making the java iimplementation work did not seem to apply to this project.
Thanks, Kevin. (I'm Larry828 who modified the scripts in KSMscratchers' nice program.) I see your "Wait..." statements added to the loops. One of the forum entries had mentioned doing that (maybe one of your entries) but I didn't know exactly where they should be.
For the moment I'm assuming this would work online if uploaded. There are so many authors and revisers at this point that it wouldn't be right for it to end up in my own account, so I'll file your remedies away for future reference if I upload something of my own.
You're a frequent commenter and submitter who's extremely helpful to all of us who are just learning. Thank you for all your help!
Offline
Larry828 wrote:
kevin_karplus wrote:
I downloaded the project and tried simplifying it...
There seems to be some serious bugs in v15---the normal tricks for making the java iimplementation work did not seem to apply to this project.Thanks, Kevin. (I'm Larry828 who modified the scripts in KSMscratchers' nice program.) I see your "Wait..." statements added to the loops. One of the forum entries had mentioned doing that (maybe one of your entries) but I didn't know exactly where they should be.
For the moment I'm assuming this would work online if uploaded. There are so many authors and revisers at this point that it wouldn't be right for it to end up in my own account, so I'll file your remedies away for future reference if I upload something of my own.
You're a frequent commenter and submitter who's extremely helpful to all of us who are just learning. Thank you for all your help!
Offline
Kevin, I added some further credits to the background and uploaded the project since the one online doesn't work.
But the debug version didn't either. When I pressed the Space key the arrow didn't move. All it did was change costume to the "YOU WIN!!!" version.
So I deleted the project again.
This has been quite difficult to get working. I'm just glad that KSMscratchers, the original author, was able to download the few changes I made and see them work fine on their own computer...
Your debug version, of course, works fine on my computer too. And I appreciate all the script changes you made since they're more logical and simpler than mine. It's a great way for me to learn how to improve my code. Thanks!!
Offline
Yes, I'm pretty sure there is a genuine bug in the java implementation that is triggered by this program, and I hope that the scratch team has someone working on it. I suspect that the patches to the scheduler for the java implementation messed up the "when key pressed" code, but this is pure conjecture on my part, as I have never seen the code.
Offline