according to http://wiki.scratch.mit.edu/wiki/Script:
A script is a collection or stack of blocks that all interlock
with one another. The blocks and their order are very important, as
they determine how sprites interact with each other and the backdrop.
Sometimes, comments are attached to scripts to explain what certain
blocks do and what the ...
Can you set numerical values for sprites and/or their costumes?
There's a variable under the Looks category named costume # that stores the current costume number of the sprite. You can use variables under the Data category to play with number either locally (i.e., for a specific sprite) or globally (i.e., among all sprites).
Does Scratch recognize values ...
In your're script window, when the Scratch game is running, you can actually see what script is running. From this, you can see that the Dragon is not moving to the original position because "when I receive 'MoveD'" script remains active, even after "Hippo" starts to move back.
This is, most likely, because the Hippo touches first the Dragon, it sends "...
Pay attention to the end of the video, where Prof. Malan explains the purpose of user-defined functions:
... as our programs get much more complicated, and our programs more sophisticated, this technique of ... decomposing your program into smaller functions, each of which call other functions, is a very compelling technique because it will ensure that ...
What you are seeing is subtle problem called a 'race condition' which is encountered quite often in programming, especially in asynchronous programs like yours.
At the moment your program is designed so that bolt will remove itself when it touches a bat. The bat also removes itself when it touches the bolt. This should work in theory, but it requires that ...
Yes, you can. The final deadline is 31 Dec 2014.
pset0 isn't submitted through the submit page. The instructions are listed at the end of the pset.
How to Submit
To submit this problem set, head to the URL below.
You’ll find that a few questions await. Be extra-sure that your answers are correct, particularly your email ...
The problem is caused by "Sprite 21". There's a script that says
if disappear is 18
The problem is that even after the message is broadcasted, disappear is still 18 and the forever block is still working.
The problem is that the condition Lifes = 0 is only checked once, when the game starts. At that point in the game Lifes = 3, always, so the first condition is ignored because it is false, and the else statement is triggered, which leads to an infinite loop for the rest of the game.
In order to fix your script, you must check if Lifes = 0 throughout the ...
In scratch, scripts are the colored blocks which have written command on it. You have to use it to move your sprite ( i.e the character ). The blocks get joined as soon you take them close. In your project it means you have to use at least three scripts ( i.e blocks) to make your project, to make your character move.
You're looking for something like this:
What this does is saves the location data before the code executes, then when you wish to restore the positioning, you can hit space and it runs.
Also, for debugging you can drag in a block, double click it and it runs (e.g. a Show block).
Note that the blocks on the reset procedure could simply be on the space bar, ...
It looks like you have the command to stop the script when Game Over is heard in more than one place (on Shark2, Fish2 and the stage) so you're probably having problems with one sprite ending the entire script before another one has finished all of its instructions; like changing colour for example. Since 'stop all' kills everything as soon as it is ...
you can always get a picture of one and import it as a sprite.
I designed a couple of the sprites in mine, search for the picture you want, download it, and then in Scratch go to 'Sprites:' at the bottom, you will see at the top-right of that panel there is a little face, a brush, a folder, and a camera. Those allow you to: select a sprite from the library, ...
In the editor window, you can always move sprites around with them mouse in order to set their initial position. This is because you are the programmer, and you are editing the sprites.
However, outside of the editor, you can only interact with the program in ways that are defined by blocks. In the program window, you are the user, and you are not allowed ...
The site basically contains various of programs peoples have done before in scratch. It can give you a basic idea of what you may try next. Remember, practice plays important role in learning to code.
Have fun coding :)
It's very okay to borrow code snippets and from other works but don't forget forget to give credit and source links.
It is reasonable and not against CS50 Honour Code to do so. As per CS50 Honour Code:
Incorporating a few lines of code that you find online or elsewhere into your own code, provided that those lines are not themselves solutions to assigned ...
If what you want is to upload an image to use it as background, you only have click on the small icon Upload backdrop from file on the left side of the screen under the tex New backdrop, next the sprites list. Once uploaded the edit tab will open, and with the editor you can select the image and resize it to fit the screen.
Otherwise if what you want is to ...
It depends on the license the image falls under. Some images are free for personal use but they usually require you to give credit to the owners of the images.
It's better and less time consuming to go to photo resource pages rather than Google so that you can see immediately what the licensing requirements are to use the image. Flicker for example allows ...
I'm guessing you would need to simulate the acceleration due to gravity. Your algo would have to accelerate the ball towards the bottom the equivalent of 9.8 m/s for each second of horizontal flight. Or if you just want to "fake it", make your ball rotate a bit for each second of flight and just keep the ball traveling in a straight line along that rotating ...
If you feel you understand the basics of scratch and are therefore ready to explore C programming, you can. But if doing this course with the expectation of receiving the certificate, the scratch problem set is MANDATORY!
All the bats are receiving the event broadcast by the bolt, which is correct. You need a way to filter which bat specifically is being hit by the bolt.
Your current solution using the cloneID to recognise which bat is being hit, could be made work, but there is a much easier way.
Suppose the bat were to respond to the hit event by checking if it is ...
Unfortunately, yes! Per the course syllabus page
Students who earn a satisfactory grade (60% or higher) on every one of
nine problem sets and on a final project will receive an honor code
certificate from HarvardX as a downloadable, printable PDF.
However, I was once in a similar situation since I also had a prior programming experience, but ...
This needs a bit of physics knowledge. It should be basically easy though! Let's imagine how gravity affects the ball in real life!
I'm not sure the following will be 100% correct since I haven't
studied physics in years
As I hit the ball up when it's going down, it starts moving up. It's velocity as I hit it is 0. It then increases, let's say (...