Game Development Reference
In-Depth Information
To make the game harder, increase the value of good_food_start_cos_idx , say to 4.
Then donut would be considered bad as well—if it tastes so good, it has to be bad, right?
Engage thrusters
We will create scripts for the following:
F To handle the <green lag> click
F To handle the level_start message
F To iniialize the look and locaion
F To scroll
F To handle collision with the player
Perform the following steps to handle the <green lag> click:
1. Start with a when <green lag> clicked block.
2. Next, let's iniialize the food variables: good_food_start_cos_idx , new_grid_
idx , num_food_per_grid , and num_costumes .
The variable good_food_start_cos_idx is the starting costume ID of the
good food group.
The variable new_grid_idx is for the next platform index to be used for a
new clone.
The variable num_food_per_grid is the number of food clones to create
for each platform.
Finally, the num_costumes variable is the number of costumes the Food
sprite has.
3.
Enter 3 in the set <good_food_start_cos_idx> to () block.
4.
Enter 0 in the set <new_grid_idx> to () block.
5.
Enter 4 in the set <num_food_per_grid> to () block.
 
Search WWH ::




Custom Search