go to your event sheet click to add event select “monster” then next!
TRANSCRIPT
![Page 1: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/1.jpg)
19. Affecting NPC Healthi.e. destroying monsters!
![Page 2: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/2.jpg)
Destroy Monsters: Step 1
Go to yourEvent Sheet
![Page 3: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/3.jpg)
Destroy Monsters: Step 2
Click to Add Event
![Page 4: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/4.jpg)
Destroy Monsters: Step 3
Select “Monster”
then
Next!
![Page 5: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/5.jpg)
Destroy Monsters: Step 4
Select “Compare instance variable”then
Next!
![Page 6: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/6.jpg)
Destroy Monsters: Step 5
Done!
Enter:• Comparison: ≤ Less or equal• Value = 0
![Page 7: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/7.jpg)
Destroy Monsters: Step 6
Click to Add Action
![Page 8: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/8.jpg)
Destroy Monsters: Step 7
Select “Monster”
then
Next!
![Page 9: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/9.jpg)
Destroy Monsters: Step 8
Select “Spawn another object”then
Next!
![Page 10: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/10.jpg)
Destroy Monsters: Step 9
<click to choose>
![Page 11: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/11.jpg)
Destroy Monsters: Step 10
Select “Explosion”
then
OK!
![Page 12: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/12.jpg)
Destroy Monsters: Step 11
Done!
Enter:• Layer = 1• Image point = 0
![Page 13: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/13.jpg)
Destroy Monsters: Step 12
Click to Add Action
![Page 14: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/14.jpg)
Destroy Monsters: Step 13
Select “Monster”
then
Next!
![Page 15: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/15.jpg)
Destroy Monsters: Step 14
Select “Destroy”then
Done!
![Page 16: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/16.jpg)
Destroy Monsters: Done!
![Page 17: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/17.jpg)
20. Global Variablese.g. player score
![Page 18: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/18.jpg)
Add Score: Step 1
Right-click, then click Add global variable
![Page 19: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/19.jpg)
Add Score: Step 2
Enter:• Name: Score• Type: Number• Initial value: 0• Description (optional)• Constant?
OK!
![Page 20: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/20.jpg)
Add Score: Step 3
Scroll to the topto see it!
![Page 21: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/21.jpg)
Add Score: Step 4
Click Add action
Scroll back to the bottom
![Page 22: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/22.jpg)
Add Score: Step 5
Select “System”
then
Next!
![Page 23: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/23.jpg)
Add Score: Step 6
Select “Add to”
then
Next!
![Page 24: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/24.jpg)
Add Score: Step 7
Enter:• Value = 1
Done!
![Page 25: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/25.jpg)
Add Score: Done!
![Page 26: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/26.jpg)
21. Adding a HUD i.e. Heads-Up Display
![Page 27: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/27.jpg)
Add HUD Layer: Step 1
ClickLayers
![Page 28: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/28.jpg)
Add HUD Layer: Step 2
Add a new layer(plus sign)
![Page 29: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/29.jpg)
Add HUD Layer: Step 3
Right-clickthen
click Rename
![Page 30: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/30.jpg)
Add HUD Layer: Step 4
Changethe nameto “HUD”
![Page 31: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/31.jpg)
Add HUD Layer: Step 5
Let’s updatethe Parallax
values…
![Page 32: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/32.jpg)
BUT FIRST… WHAT IS PARALLAX?
When the background layers
scroll separately
Source: Super Mario Bros, from Nintendohttp://wakeupandcode.com/c2/parallax.html
![Page 33: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/33.jpg)
Add HUD Layer: Step 6
Set the HUD’sParallax to
0, 0
![Page 34: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/34.jpg)
Add HUD Layer: Done!
![Page 35: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/35.jpg)
22. Displaying Texte.g. player score
![Page 36: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/36.jpg)
Display Text: Step 1
then Insert new object
Right-clicktop left
of Layout 1
![Page 37: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/37.jpg)
Display Text: Step 2
Select“Text”
then
Click Insert
![Page 38: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/38.jpg)
Display Text: Step 3
Click to placeText object(HUD layer)
![Page 39: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/39.jpg)
Display Text: Step 4
NoticeText object
![Page 40: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/40.jpg)
Display Text: Step 5
Change Properties
• Font• Style: Bold Italic• Size: 24
• Color: Yellow
![Page 41: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/41.jpg)
Display Text: Done!
![Page 42: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/42.jpg)
23. Updating the HUDe.g. showing player score
![Page 43: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/43.jpg)
BUT FIRST… HOW DO YOU COMBINE TEXT?
"Score: " & ScoreString Variable
&(ampersand)
spacequote quotetext
![Page 44: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/44.jpg)
Score: 100
WHAT WILL IT LOOK LIKE IN THE GAME?
"Score: " & Scoredisplays
![Page 45: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/45.jpg)
Display Score: Step 1
ClickAdd action
For System, Every tick
![Page 46: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/46.jpg)
Display Score: Step 2
Select “Text”then
Next!
![Page 47: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/47.jpg)
Display Score: Step 3
Select “text”then
Next!
![Page 48: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/48.jpg)
Display Score: Step 4
Enter:• “Score: “ & Score
Done!
![Page 49: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/49.jpg)
Display Score: Done!
![Page 50: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/50.jpg)
24. Spawning NPCsi.e. more monsters
![Page 51: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/51.jpg)
Spawn Monsters: Step 1
Click to Add Event
![Page 52: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/52.jpg)
Spawn Monsters: Step 2
Select “System”
then
Next!
![Page 53: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/53.jpg)
Spawn Monsters: Step 3
Select “Every X seconds”then
Next!
![Page 54: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/54.jpg)
Spawn Monsters: Step 4
Done!
Enter:• Interval (seconds): 3
![Page 55: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/55.jpg)
Spawn Monsters: Step 5
Click to Add Action
![Page 56: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/56.jpg)
Spawn Monsters: Step 6
Select “System”
then
Next!
![Page 57: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/57.jpg)
Spawn Monsters: Step 7
Select “Create object”then
Next!
![Page 58: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/58.jpg)
Spawn Monsters: Step 8
<click to choose>
![Page 59: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/59.jpg)
Spawn Monsters: Step 9
Select “Monster”
then
OK!
![Page 60: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/60.jpg)
Spawn Monsters: Step 10
Done!
Enter:• Layer = 1• X = 1400• Y = random(1024)
![Page 61: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/61.jpg)
Spawn Monsters: Done!
![Page 62: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/62.jpg)
25. Destroying the Player
![Page 63: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/63.jpg)
Destroy Player: Step 1
Click to Add Event
![Page 64: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/64.jpg)
Destroy Player: Step 2
Select “Monster”
then
Next!
![Page 65: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/65.jpg)
Destroy Player: Step 3
Select “On collision with another object”then
Next!
![Page 66: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/66.jpg)
Destroy Player: Step 4
<click to choose>
![Page 67: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/67.jpg)
Destroy Player: Step 5
Select “Player”
then
OK!
![Page 68: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/68.jpg)
Destroy Player: Step 6
Done!
![Page 69: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/69.jpg)
Destroy Player: Step 7
Click to Add Action
![Page 70: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/70.jpg)
Destroy Player: Step 8
Select “Player”
then
Next!
![Page 71: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/71.jpg)
Destroy Player: Step 9
Select “Destroy”then
Done!
![Page 72: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/72.jpg)
Destroy Player: Done!
![Page 73: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/73.jpg)
Wrap-Up
![Page 75: Go to your Event Sheet Click to Add Event Select “Monster” then Next!](https://reader035.vdocument.in/reader035/viewer/2022062519/56649ca45503460f94964899/html5/thumbnails/75.jpg)
Construct 2 Forum & FB group
FB: https://www.facebook.com/groups/construct2devs/
Forum: https://www.scirra.com/forum/