Game Development Reference
In-Depth Information
9. In this case, we will add an opion to add a number to the funcion. This will be
called number1 by default, which is fine. Refer to the following screenshot:
10. When the funcion runs, set the change <points> by number1 block. This is the
value that we will add into the funcion each ime we use it.
11. Add an if () then statement to make a check.
12. Check if points < 0 .
13. When that's the case, the sprite containing the funcion will show the say (No more
points. Game over!) for 2 secs block.
14. We will then set the stop <all> script to end the game, as shown in the
following screenshot:
 
Search WWH ::




Custom Search