![]() Use the Draw Text block under the Drawing category to draw the Score to the screen. Optional Activity - Draw the Score This optional activity will introduce you to drawing data to the game screen. What exactly is happening here? Under the hood, the behavior is listening for collisions between the player and any actors that are considered enemies. Now, run the game and jump on top of the enemy. Configure the Stompable Group field to Enemies. Add the Stomp on Enemies behavior to our Hero. Let s give our Hero the ability to stomp an enemy. Instead, our Hero just lands on top, and nothing happens. 4 Stomping Enemies You may notice that jumping on top of the enemy does not kill it. Behaviors grant new abilities to Actors, letting them do more than before. What did you do? You added a Jump behavior to the Hero. Notice that the Hero can now jump! (Press the Spacebar) Hero can t jump high enough? Experiment with the Jump Force field. Jump Key Jump Jump Force 25 Jump Sound Jump Right Animation Jump Left Animation Jump Walk (R) Walk (L) Now, run the game again. You ll now see a form with some customizable fields. (It s at the bottom left as shown below)ΔΆ On the screen that pops up, pick FROM THIS GAME > All > Jumping. 3 Make the Hero Jump Open up the actor type called Hero. You may realize that the game isn t fun because the Hero can t jump. After you re done, run the game again and play through your level. Doesn t it look a bit empty? Play around with the editor by adding some blocks. Now, you ll see the level you just played. 2 Build the Stage Open up the scene called Level 1. After the game appears, move the Hero around using the left/right arrow keys. (Can t find Project 1? Visit to get it) Click Test Game (in the top toolbar) to run the game. 1 Get Started After launching Stencyl, open up Project 1. ![]() 1 Lesson 1 - Make Your First Game with Stencyl In this activity, you ll create a simple jump and run game using Stencyl. ![]()
0 Comments
Leave a Reply. |