DIRECTIONS: Follow along with the Platformer - Cashin’ In screencast while following along with this step-by-step instruction sheet. ❏
❏
Open the existing “Platformer” project in Construct 2
● Insert your USB/Flash Drive and go to COLESTOCK > GAMEDEV > Platformer
Create the Coin
● Make sure “Content” layer is active and unlocked
● Double-click on the “Platformer.capx” project file
● Right-click OBJECT TYPES > Select “Insert new object” ● Select “Sprite” > Name when inserted: "Coin" > INSERT ● When crosshair appears, click inside “Game” layout > Edit image dialog box will appear > Click folder icon ● Browse to and OPEN: Platformer > media > coin.png ● Click X to close; Coin should be on the “Content” layer ❏
Make More Coins
● CTRL + drag/release with mouse to duplicate ● Create lots of coins for the Alien to try to collect
❏
❏
Create a Global Variable to Track the Number of Coins Left
Double-check “Game Sheet”
● Under “Event Sheets” > Right-click “Game Sheet” > OPEN ● Right-click “Add global variable”; set the following: ○ Name: CoinsLeft ○ Type: Number ○ Initial value: 0 ○ Description: Tracks the Number of Coins Left
❏
Add Code to Game Sheet to Populate CoinsLeft Variable at Start of Game
● Under “Event Sheets” > Right-click “Game Sheet” > OPEN ● Select top-most event in Event Sheet Right-click “Insert new event above” ○ ○ ○ ○ ○
❏ ❏
Double-click "System" Select "On start of layout" (under "Start & end") Select "Add action" Double-click "System" Select "Set value" (under “Global & local variables”); set these values: ■ Variable: CoinsLeft ■ Value: Coin.Count
Double-check “Game Sheet” Add Code to Game Sheet to Destroy Coins on Collision with the Alien and to decrement the CoinsLeft Variable
● Under “Event Sheets” > Right-click “Game Sheet” > OPEN ● Select top-most event in Event Sheet Right-click “Insert new event below” ○ Double-click "Alien" ○ Select "On collision with another object" (under "Collisions") ○ Set this value: ■ Object: Coin ○ Select "Add action" ○ Double-click "Coin" ○ Select "Destroy" (under “Misc”) ○ Select "Add action" ○ Double-click "System" ○ Select "Subtract from" (under “Global & local variables”); set these values: ■ Variable: CoinsLeft ■ Value: 1
❏
Double-check “Game Sheet”
❏
Create the Flag
● Make sure “Content” layer is active and unlocked ● Right-click OBJECT TYPES > Select “Insert new object” ● Select “Sprite” > Name when inserted: "Flag" > INSERT
● When crosshair appears, click inside “Game” layout > Edit image dialog box will appear > Click folder icon ● Browse to and OPEN: Platformer > media > flagA.png ● Click X to close; Flag should be on the “Content” layer ❏
Make sure Flag is behind the Alien by changing its Z Order
● Select the Flag > Right-click > Select “Z Order” > Send to bottom of layer
❏
Animate the Flag
● Select the Flag > Right-click > Select “Edit animations” ● Create a two-frame animation with the following frames: ○ Frame 0: flagA.png ○ Frame 1: flagB.png For each frame you need to create: Click the folder icon > Navigate to the image file (.png) > Select “Open” > Right-click “add frame” in the “animation frames” window Then Select “Set collision polygon” > Adjust polygon to reflect Flag’s true size > Deselect “Set collision polygon” ● Right-click “Delete” any remaining empty frame ● Click X to close the “Edit image” window
❏
Set Flag’s “Default” Animation Properties
● Select the Flag > Right-click > Select “Edit animations” > Select “Default” animation > Set the following properties: ○ Animation ‘Default’ properties ■ Speed: 4 ■ Loop: Yes ● Click X to close
❏
Add Code to Game Sheet to Restart Game if Alien collides with the Flag and CoinsLeft is 0
● Under “Event Sheets” > Right-click “Game Sheet” > OPEN ● Select top-most event in Event Sheet Right-click “Insert new event below” ○ Double-click "Alien" ○ Select "On collision with another object" (under "Collisions") ○ Set this value: ■ Object: Flag
○ Right-click "Add another condition" ○ Double-click "System" ○ Select "Compare variable" (under “Global & local variables”); set these values: ■ Variable: CoinsLeft ■ Comparision: = Equal to ■ Value: 0 ○ Select "Add action" ○ Double-click "System" ○ Select "Restart layout" (under “General”) ❏
Double-check “Game Sheet”
❏
Play/Test Game
● Make sure “Game” Layout is selected ● DEBUG LAYOUT (Bug with play button at top)