im new and last year my class used scratch all the time but i never thought of making an account. They didnt teach us much so i want to learn more about scratch and how to make your characters have health.
Offline
make a health variable if it is below 1 then the character dies
Offline
yeah but how do i make a health variable?
Offline
Lastmanstanding wrote:
yeah but how do i make a health variable?
Click on variables and then click "make new variable". If you want to see the most basic health bar tutorial, see mine: http://scratch.mit.edu/projects/adriangl/652390
Offline
First create a variable and name it something along the lines of "Health".
To do this click "Variables" "New variable" and then type the name in
Next, add this script.
"When green flag pressed"
"Set health to (choose number, 100 is a good starting point)"
Then add this to the bottom of that script piece.
"Forever if" (Here's where you add what damages your sprite, in this example the colour blue is harmful) "Touching blue"
"Change health by -(number of how much health is lost each hit. 1, 2, 10 etc: )"
If you want more I will try and upload a project as it does sound confusing
Offline