Game Development Reference
In-Depth Information
5. We make the sword point in the direcion using the point in direcion catDir block,
so it will be facing the same way as the cat sprite.
6. Then, we make it move using the move 15 steps block so the sword isn't on top of
the cat but a bit in front of it.
7. We use the show block to show the sprite.
8. Then, we use the wait 0.2 secs block to keep it visible for a short while.
9. We use the hide block to hide the sprite again.
We sill have to change the catDir value to actually make it work. To do that, we add a few
blocks to the cat scripts.
1. We click on the cat sprite to view its scripts.
2.
To each of the key pressed scripts, we add a set <catDir> to... block after we have
changed its direcion.
 
Search WWH ::




Custom Search