Game Development Reference
In-Depth Information
3.
Inside the condiion block, we check if scoreYellow is greater than 14 by entering
14 in the scoreYellow > () block.
4.
If that is the case, we will create two clones at an angle as follows:
1.
First, we enter 15 in the turn <counter clockwise> () degrees block to turn
the sprite upwards a bit.
2.
Then, create your clone by using the create clone of <myself> block.
3.
Next, enter 30 in the turn <clockwise> () degrees block to angle the same
distance downwards.
4.
Again create your clone by using the create clone of <myself> block.
We leave this script for a moment before we place it in its proper spot.
Now on to scriping what happens when the scoreYellow value reaches 30.
1. Again, we need an if () then () else () condiion block. The quick way to get what
we want is to right-click on the piece we just wrote and then on duplicate .
2. Then, we change the value to 29 instead of 14.
3. We add another create clone of <myself> block at the start of the if ()
bracket to create a clone that will move straight ahead.
4. We change the posiion of the other two clones to spread them out a bit using the
follow steps. This way they won't overlap at the start of their movement, which
looks a bit nicer.
1.
Add change y by () with value 10 to move the upward angled clone up a bit.
 
Search WWH ::




Custom Search