Game Development Reference
In-Depth Information
The finished script looks like the following screenshot:
Game Manager also has a custom block to start a new level. It's called
Start Level <level_
num>
. It's already included in the starter project so that one can test the other sprites. We
do not need to make a change to the Game Manager scripts yet; let's take a look inside the
Start Level ()
block:
1. Add
switch costume to <level_num>
, which is the level banner.
2. Create the scrolling effect using
go to x: () y: ()
with the values
-14
and
-188
, then
show
and
glide 4 secs to x: () y ()
with values
-30
and
180
for x and y respecively.
Then add
hide
.
3.
Now, add
set <current_enemy_type> to item <level_num> of <enemyTypeList>
.
4.
Then, add
set <current_enemies_to_create> to item <level_num> of
<enemyCountList>
.
5.
Next, add
set <current_enemy_threshold> to item <level_num> of
<enemyThresholdList>
.
6.
Then come the
repeat <current_enemies_to_create>
and
create clone of <current_
enemy_type>
blocks.
7.
Add
set <current_enemy_count> to <num_enemies_to_create>
.
8.
Lastly, add the
broadcast <imer_start>
block.