การสร้างเกมแนว Shooting

112
กกกกกกกกกกกกกก Shooting

description

การสร้างเกมแนว Shooting. การสร้างเกมแนว Shooting. เกมแนว Shooting เกิดขึ้นมานานแล้วก่อนเกม Pong เสียอีก ซึ่งได้มีการพัฒนาวีการเล่นเรื่อยมาจนมาถึงปัจจุบัน เกมแนวนี้ยังคงได้รับความนิยมอยู่เนื่องจากสามารถเล่นได้เรื่อยๆ และท้าทายความสามารถซึ่งต้องอาศัยทักษะการบังคับหลบหลีกเป็นหลัก. - PowerPoint PPT Presentation

Transcript of การสร้างเกมแนว Shooting

Page 1: การสร้างเกมแนว  Shooting

การสรางเกมแนว Shooting

Page 2: การสร้างเกมแนว  Shooting

การสรางเกมแนว Shooting

เกมแนว Shooting เกดขนมานานแลวกอนเกม Pong เสยอก ซงไดมการพฒนาวการเลนเรอยมาจนมาถงปจจบน เกมแนวนยงคงไดรบความนยมอยเนองจากสามารถเลนไดเรอยๆ และทาทายความสามารถซงตองอาศยทกษะการบงคบหลบหลกเปน

หลก

Page 3: การสร้างเกมแนว  Shooting

การสรางเกมแนว Shooting

ในป1943 ขณะทเครองเลน Famicom โดงดงสดขด บรษท Capcom จงไดสรางเกมชอ 1943 ขนมา ซงพฒนามาจากภาคกอนๆ โดยเปนเกมทจำาลองเหตการณสงครามโลก ผเลนจะตองบงคบเครองบนเพอทำาลายศตรใหหมด นบวาเปนเกมทไดรบความนยมมากอกเกมหนง

Page 4: การสร้างเกมแนว  Shooting

สราง Room

เรมจากการสราง room โดยตงคาตอไปน

Page 5: การสร้างเกมแนว  Shooting

โหลดภาพ Sprite

นำาภาพ sprite เขามาเกบไวพรอมทง ภาพพนหลงดวยสงเกตชอไฟลจะตรงกบ ชอ sprite หลงจาก “sp_”

Page 6: การสร้างเกมแนว  Shooting

การทำาใหพนหลงเคลอนท

การตงคาพนหลงท Room Properties ใหความเรวแนวตงของพนหลงเปน 1 เพอใหดเหมอนเครองบนกำาลงบนขนเรอยๆ ดงตอไป

Page 7: การสร้างเกมแนว  Shooting

การทำาใหเครองบนดนจอไปทางซายและขวา

สำาหรบมมมองนนถาสงเกตในเกมจะเหนวา เมอเครองบนของผเลนบนไปสดจอดานขวาและซาย มมมองจะเลอนตามผเลนไป สามารถตงคาไดตอไปน สงเกตทชอง Object following ซงขณะนเรายงไดสรางวตถแทนตวผเลนซงจะปรากฏใ นขนตอนตอไป

Page 8: การสร้างเกมแนว  Shooting

สรางออบเจกต

ลำาดบตอไปใหสรางออบเจกตในเกมซงจะมคอนขางมาก สามารถแบงออกเปนหมวดหมไดดงน

Page 9: การสร้างเกมแนว  Shooting

กลม Player

ออบเจกตภายในกลมนจะเกยวกบตวทผเลนตองควบคมอาวธของผเลน รวมถงการแสดงสถานะของผเลนดวย

Page 10: การสร้างเกมแนว  Shooting

กลม Enemy

ออบเจกตภายในกลมนจะเกยวของกบศตร อาวธศตรและการควบคมสรางศตร

Page 11: การสร้างเกมแนว  Shooting

กลม Island

ออบเจกตภายในกลมนจะไมเกยวของกบการเลนเกมแตจะสรางขนมาประกอบฉากเพอความสวยงาม

Page 12: การสร้างเกมแนว  Shooting

รายละเอยดของออบเจกตในแตละกลมมดงตอไปน กลม Player

Information about object: player เปน parent ของเครองบนทกลำา Sprite: <no sprite> Solid: false Visible: true Depth: -10 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 13: การสร้างเกมแนว  Shooting
Page 14: การสร้างเกมแนว  Shooting

กลม Player

Create Event: COMMENT: ตงตวแปรเพอถวงเวลาการยง ถาคา

เปน 0 คอยงได ถาคาเปน 1 คอนยงไมได Set variable shot to 0

Page 15: การสร้างเกมแนว  Shooting
Page 16: การสร้างเกมแนว  Shooting

กลม Player

Alarm Event for alarm 0: COMMENT: คนคา 0 ทำาใหยงไดอกครง Set variable shot to 0

Page 17: การสร้างเกมแนว  Shooting
Page 18: การสร้างเกมแนว  Shooting

Player

Step Event: COMMENT: ทำาใหเครองบนไมออกนอกจอ If bbox_right is lager than room_width Set variable x to room_width- (sprite_width/2) If bbox_left is smaller than 0 Set variable x to sprite_width/2 If bbox_bottom is larger than room_height Set variable y to room_height-(sprite_height/2) If bbox_top is smaller than 0 Set variable y to sprite_height/2

Page 19: การสร้างเกมแนว  Shooting
Page 20: การสร้างเกมแนว  Shooting

Player

End Step Event: COMMENT: เมอพลงหมด If health is smaller than 1 Create a medium effect of type ring relative at (0,0) of color 4227327 above objects COMMENT: เมอตายจะหนวงเวลารอกลองขอความขน For all show_status: set Alarm 0 to 120 destroy

the instance

Page 21: การสร้างเกมแนว  Shooting
Page 22: การสร้างเกมแนว  Shooting

Player

Collision Event with object enemy: COMMENT: ถาชนกบเครองบนศตรเราจะเสยพลง

เทากบตวแปร power ของศตร และใหศตรระเบด Set the health relative to -other.power for other object: destroy the instance

Page 23: การสร้างเกมแนว  Shooting
Page 24: การสร้างเกมแนว  Shooting

Player

Collision Event with object bullet_enemy: COMMENT: ถาโดนกระสนศตรพลงจะลดเทากบ

power ของกระสนศตร และทำาลายกระสนศตรดวย Set the health relative to-other.power for other object: destroy the instance

Page 25: การสร้างเกมแนว  Shooting
Page 26: การสร้างเกมแนว  Shooting

Player

Mouse Event for Glob Right Pressed: if global.bomb is larger than 0 for all enemy: destroy the instance for all bullet_enemy: destroy the

instance set variable global.bomb relative to -1

Page 27: การสร้างเกมแนว  Shooting
Page 28: การสร้างเกมแนว  Shooting

Player

Key Press Event for 1-key Key: COMMENT: เปลยนเครองบน Change the instance into object player 1, yes Performing events Key Press Event for 2-key Key: COMMENT: เปลยนเครองบน Change the instance into object player 2, yes Performing events

Page 29: การสร้างเกมแนว  Shooting

Player

Key Press Event for 3-key Key: COMMENT: เปลยนเครองบน Change the instance into object player 3, yes Performing events Key Press Event for 4-key Key: COMMENT: เปลยนเครองบน Change the instance into object player 4, yes Performing events

Page 30: การสร้างเกมแนว  Shooting

Player

Key Press Event for 5-key Key: COMMENT: เปลยนเครองบน Change the instance into object player 5, yes Performing events

Page 31: การสร้างเกมแนว  Shooting

object: bullet_player

Information about object: bullet_player กระสนทวไปของเครองบนผเลน Sprite: sp_bullet_player Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 32: การสร้างเกมแนว  Shooting
Page 33: การสร้างเกมแนว  Shooting

Create Event: COMMENT: พลงกระสนทจะไปลด hp ศตร Set variable power to 1

Page 34: การสร้างเกมแนว  Shooting
Page 35: การสร้างเกมแนว  Shooting

Step Event: COMMENT: ทำาใหทศทางของกระสนถกตองและเมอกระสน

ออกนอกจอใหทำาลายทง Scale the sprite with 1 in the xdir, 1 in the ydir, Rotate over direction-90, and no mirroring If expression y > room_heigth + 100 || y <-100 || x<-

100 || x>room_width + 100 is true Destroy the distance

Page 36: การสร้างเกมแนว  Shooting

Information about object: player1

เครองบนแบบทหนงของผเลนสามารถยงกระสนไดทละ 2 นด และเคลอนทไดเรว

Sprite: sp_ player1 Solid: false Visible: true Depth: -10 Persistent: false Parent: player Mask: <same as sprite>

Page 37: การสร้างเกมแนว  Shooting

player1

Step Event: COMMENT: วงตามเมาสและเรยกเหตการณเหมอนกบ

parent Perform a step towards position (mouse_x,

mouse_y) With speed 3 stop at solid only Call the inherited event of the parent object

Page 38: การสร้างเกมแนว  Shooting
Page 39: การสร้างเกมแนว  Shooting

player1

Mouse Event for Glob Left Button: COMMENT: ยงกระสนคา shot ตองเปน 0 เทานน if shot is equal to 0 create instance of object bullet_player at relative

position (-5,0) with speed 10 in direction 90 create instance of object bullet_player at relative

position (5,0) with speed 10 in direction 90 set variable shot to 1 set Alarm 0 to 20

Page 40: การสร้างเกมแนว  Shooting

Information about object: player2

เครองบนแบบทสองของผเลนสามารถยงกระสนไดเรวตดตอกนแตเคลอนทชา

Sprite: sp_player2 Solid: false Visible: true Depth: -10 Persistent: false Parent: player Mask: <same as sprite>

Page 41: การสร้างเกมแนว  Shooting

player2

Step Event: COMMENT: วงตามเมาสและเรยกเหตการณเหมอนกบ

parent perform a step towards position (mouse_x,mouse_y)

with speed 3 stop at solid only call the inherited event of the parent object

Page 42: การสร้างเกมแนว  Shooting
Page 43: การสร้างเกมแนว  Shooting

player2

Mouse Event for Glob Left Button: COMMENT: ยงกระสน คา shot ตองเปน 0 เทานน if shot is equal to 0 create instance of object bullet_player at

relative position (0,0) with speed 10 in direction 90

set variable shot to 1 set Alarm 0 to 5

Page 44: การสร้างเกมแนว  Shooting

Information about object: player3

เครองบนแบบทสามของผเลนสามารถยงกระสนกระจาย 3 ทศทางแตเคลอนทปานกลาง

Sprite: sp_ player3 Solid: false Visible: true Depth: -10 Persistent: false Parent: player Mask: <same as sprite>

Page 45: การสร้างเกมแนว  Shooting

player3

Step Event: COMMENT: วงตามเมาสและเรยกเหตการณเหมอนกบ

parent Perform a step towards position (mouse_x,

mouse_y) With speed 2 stop at solid only Call the inherited event of the parent object

Page 46: การสร้างเกมแนว  Shooting
Page 47: การสร้างเกมแนว  Shooting

player3

Mouse Event for Glob Left Button: COMMENT: ยงกระสนคา shot ตองเปน 0 เทานน If shot is equal to 0 Create instance of object bullet_player At relative position (0,0) with speed 10 In direction 115 Create instance of object bullet_player At relative position (0,0) with speed 10 In direction 90 Create instance of object bullet_player At relative position (0,0) with speed 10 In direction 65 Set variable shot to 1 Set alarm 0 to 10

Page 48: การสร้างเกมแนว  Shooting

Information about object: bullet_player4

กระสนของเครองบนแบบทสจะแตกตางจากกระสนทวไป

ตรงทเมอสรางขนมาแลวจะตองเซต path ตามทกำาหนดไว โดยให Add path ดงน

Page 49: การสร้างเกมแนว  Shooting

bullet_player4

Create Event: Call the inherited event of the parent object COMMENT: เซตกระสนเขา path Set the relative path to path_bullet_palyer4 with Speed 10 and at the end relative

Page 50: การสร้างเกมแนว  Shooting

Information about object: player4

เครองบนแบบทสของผเลนสามารถยงกระสนโคงในแนวกวางไปดานหนา

Sprite: sp_ player 4 Solid: false Visible: true Depth: -10 Persistent: false Parent: player Mask: <same as sprite>

Page 51: การสร้างเกมแนว  Shooting

player4

Step Event: COMMENT: วงตามเมาสและเรยกเหตการณเหมอนกบ

parent Perform a step toward position (mouse_x, mouse_y) With speed 4 stop at solid only Call the inherited event of the parent object

Page 52: การสร้างเกมแนว  Shooting
Page 53: การสร้างเกมแนว  Shooting

player4

Mouse Event for Glob Left Button COMMENT: ยงกระสนคา shot ตองเปน 0 เทานน If shot is equal to 0 Create instance of object bullet_player4 at Relative position (0,0) Set variable shot to 1 Set alarm 0 to 10

Page 54: การสร้างเกมแนว  Shooting

Information about object: missile

กระสนของเครองบนแบบทหาจะยงเขาหาศตร Sprite: sp_ missile Solid: false Visible: true Depth: 0 Persistent: false Parent: bullet_player Mask: <same as sprite>

Page 55: การสร้างเกมแนว  Shooting

missile

Create Event: Call the inherited event of the parent object Set the vertical speed to -5 COMMENT: หนวงเวลา 10 step แลวคอยคลอนทเขาหา

ศตร Set the relative pass to 0 Set alarm 0 to 10

Page 56: การสร้างเกมแนว  Shooting

missile

Alarm Event for alarm 0: COMMENT: ใหตวแปรเทากบ 1 เงอนไขใน step

event จะเปนจรงเพอใหเคลอนทเขาหาศตร Set variable pass to 1

Page 57: การสร้างเกมแนว  Shooting
Page 58: การสร้างเกมแนว  Shooting

missile

Step Event: COMMENT: เมอเงอนไขเปนจรงจะวงเขาหาศตร If pass is equal to 1 COMMENT: ดงตวแปร near เกบคา id ศตรทอยใกลกบตวเองมากทสด Set variable near to instance_nearest (x,y,enemy) COMMENT: ถามศตรใหวงเขาหาศตรตามตวแปร near ถาไมมศตรใหวง

ตรงไปดวยความเรว 10 If number of objects enemy is Larger than 0 Perform a step towards position (near.x,near.y) With speed 10 avoiding solid only Else Set variable speed to 10 COMMENT: เรยกเหตการณของ parent Call the inherited event of the parent object

Page 59: การสร้างเกมแนว  Shooting

Information about object: Player5

เครองบนแบบทหาของผเลนสามารถยงจรวด missile เขาหาศตรได

Sprite: sp_ player5 Solid: false Visible: true Depth: -10 Persistent: false Parent: player Mask: <same as sprite>

Page 60: การสร้างเกมแนว  Shooting

Player5

Step Event: COMMENT: วงตามเมาสและเรยกเหตการณเหมอนกบ

parent Perform a step towards position (mouse_x,

mouse_y) With speed 3 stop at solid only Call the inherited event of the parent object

Page 61: การสร้างเกมแนว  Shooting
Page 62: การสร้างเกมแนว  Shooting

Player5

Mouse Event for Glob Left Button: COMMENT: ยงกระสนคา shot ตองเปน 0 เทานนและตองมสตร

ในฉากดวย If number of objects enemy is Larger than 0 If shot is equal to 0 Create instance of object missile at relative Position (-20, 0) Create instance of object missile at relative Position (20, 0) Set variable shot to 1 Set Alarm 0 to 30

Page 63: การสร้างเกมแนว  Shooting

Information about object: show_status

แสดงสถานะตางๆ ของผเลนซงจะตอง Add Font กอนดงน

Page 64: การสร้างเกมแนว  Shooting

show_status

Sprite: <no sprite> Solid: false Visible: true Depth: -10 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 65: การสร้างเกมแนว  Shooting
Page 66: การสร้างเกมแนว  Shooting

show_status

Alarm Event for alarm 0: COMMENT: เมอเราตายชวตจะลดไป 1 Set the number of lives relative to -1 COMMENT: ถายงมชวตเหลอมากกวา 0 ใหเลนตอไป ถานอยกวากแพ If lives are larger than 0 Sleep 0 millisecond; redrawing the Screen: true Display message: try again !!! Set the health to 100 Restart the current room with transition Effect interlaced form left

Page 67: การสร้างเกมแนว  Shooting

show_status

Else Sleep 0 millisecond; redrawing the Screen: true Show the highscore table Background: <undefined> Show the border New color: 225, other color: 0 Font: “Time New Roman” , 10, 0, 0, 0, 0, 0 If the player does say yes to the Question: Game Over!!! # try again? Restart the game Else End the game

Page 68: การสร้างเกมแนว  Shooting

Other Event: Game Start: COMMENT: เมอเรมเกมใหมใหตงคาทกอยางตามน Set the number of lives to 3 Set the health to 100 Set variable global. Bomb to 3 Set the score to 0

Page 69: การสร้างเกมแนว  Shooting
Page 70: การสร้างเกมแนว  Shooting

Draw Event: COMMENT: แสดงผลตางๆ บนหนาจอ Draw the lives relative at (view_xview [0], view_yview [0]) with sprite life Draw the health bar with relative size (view_xview [0] -15, view_yview [0] – 30, view_xview [0] + 80, view_yview [0]-20) with black Color black and bar color green to red At relative position (view_xview [0] +30, view_yview [0] –50) draw text: ‘bomb: ‘+string (global.bomb) At relative position (view_xview [0] +530, view_yview [0] –10) draw the value Of score with caption score: At relative position (view_xview [0] +300, view_yview [0]) draw text: press <F1> to help

Page 71: การสร้างเกมแนว  Shooting

กลม Enemy

Information about object: control_enemy ใชสมเวลาเกดของศตรแตละตว Sprite: <no sprite> Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 72: การสร้างเกมแนว  Shooting

control_enemy

Create Event: COMMENT: สมเวลาการออกมาของศตร set Alarm 0 to random(180)+60

Page 73: การสร้างเกมแนว  Shooting
Page 74: การสร้างเกมแนว  Shooting

control_enemy

Alarm Event for alarm 0: With a chance of 1 out of 3 do perform the next Action COMMENT: สมตำาแหนงทจะเกดตามความกวางของ room Create instance of object enemy2_set at position (random (room_width), 0) Else Create instance of object enemy1 at Position (random (room_width), 0) Set Alarm 0 to random (180) +60

Page 75: การสร้างเกมแนว  Shooting

control_enemy

Draw Event: COMMENT: แสดง hp หรอพลงของศตรเปนตวเลข Set the font for drawing text to font0 and align Center Set the drawing color to 8454143 For all enemy: at relative position (0, -30) draw Text: ‘HP:’ +string (hp)

Page 76: การสร้างเกมแนว  Shooting

enemy

Information about object: enemy เปน parent ของศตรทกตว Sprite: <no sprite> Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 77: การสร้างเกมแนว  Shooting

enemy

Destroy Event: COMMENT: เมอถกทำาลายจะเลนเอฟเฟกตระเบด Create a small effect of type ring relative at (0,0) of color 255 above object

Page 78: การสร้างเกมแนว  Shooting
Page 79: การสร้างเกมแนว  Shooting

enemy

Step Event: COMMENT: ปรบทศทางใหถกตองและถาออกนอก room

จะถกทำาลาย Scale the sprite with 1 in the xidir, 1 in the ydir, Rotate over direction+90, and mirroring If expression y>room_height+100 || y<-100 || x<-100 || x>room_width+100 is true Destroy the instance

Page 80: การสร้างเกมแนว  Shooting
Page 81: การสร้างเกมแนว  Shooting

enemy

Collision Event with object bullet_player: COMMENT: เมอชนกบกระสนของผเลน พลง hp จะลด

เทากบ power ของกระสนผเลน Set variable hp relative to – other. Power COMMENT: ทำาลายกระสนผเลนทงดวย For other objects: destroy the instance COMMENT: ถา hp นอยกวา 1 จะตาย และผเลนไดคะแนน If hp is smaller than 1 Set the score relative to hpfull*100 Destroy the instance

Page 82: การสร้างเกมแนว  Shooting

enemy1

Information about object: enemy1 ศตรตวทหนงเคลอนทลงแนวดง สามารถยงกระสนใสผ

เลนได Sprite: sp_enemy1 Solid: false Visible: true Depth: 0 Persistent: false Parent: enemy Mask: <same as sprite>

Page 83: การสร้างเกมแนว  Shooting
Page 84: การสร้างเกมแนว  Shooting

enemy1

Create Event: COMENT: สม hp หรอพลงของตวเอง (จะไดเลข 1-5) Set variable hp to ceil (random (5)) COMMENT: ตงคา hpfull ไว เมอศตรตายจะใชอางถงตวแปรน ซงคะแนนผ

เลนจะไดเทากบ hpfull x 100 Set variable hpfull to hp COMMENT: power: ซงใชเวลาไปชนกบผเลน ผเลนจะตองถกลบพลงไปเทา

คาของตวแปรน Set variable power to 40 COMMENT: หนวยเวลายงกระสน Set Alarm 0 to 60 COMMENT: ใหเครองบนเคลอนทลง Set the variable vertical speed to 2

Page 85: การสร้างเกมแนว  Shooting
Page 86: การสร้างเกมแนว  Shooting

enemy1

Alarm Event for alarm 0: COMMENT: ยงกระสนเขาหาผเลน If number of objects player is equal to 1 Create instance of object

bullet_enemy at Relative position (0,0) Set Alarm 0 to 60

Page 87: การสร้างเกมแนว  Shooting

bullet_enemy

Information about object: bullet_enemy กระสนทวไปของศตรและเปน parent ดวย Sprite: sp_enemy_enemy Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 88: การสร้างเกมแนว  Shooting

bullet_enemy

Create Event: COMMENT: เมอชนกบผเลน พลงผเลนจะลดลงเทากบ

ตวแปรน Set variable power to 20 COMMENT: เคลอนทเขาหาผเลน Start moving in the direction of position (player.x, player.y) with speed 4

Page 89: การสร้างเกมแนว  Shooting

bullet_enemy

Destroy Event: Comment: เมอถกทำาลายจะเลนเอฟเฟกตระเบด For other object: create a small effect of type ring relative at (0,0) of color 4227327 above

object

Page 90: การสร้างเกมแนว  Shooting

bullet_enemy

Step Event: COMMENT: เมออกนอก room จะทำาลายตวเอง If expression y>room_height + 100 || y<-100 ||

x< -100|| x>room_width +100 is true

Destroy the instance

Page 91: การสร้างเกมแนว  Shooting

enemy2_set

Information about object: enemy2_set ใชสรางศตรแบบทสองออกมาทละ 5 ลำา เมอออกมาครบจะ

ทำาลายตวเอง Sprite: <no sprite> Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 92: การสร้างเกมแนว  Shooting

enemy2_set

Create Event: COMMENT: ตวแปร 1 ตงขนเพอนบจำานวนเครอง

บนทจะสราง Set variable i to 0 COMMENT: หนวงเวลาการสรางเครองบน Set Alarm 0 to 25

Page 93: การสร้างเกมแนว  Shooting
Page 94: การสร้างเกมแนว  Shooting

enemy2_set

Alarm Event for alarm 0: COMMENT: ถาเครองบนยงไมถง 5 ลำา ใหสรางตอไป If I is smaller than 5 Create instance of object enemy2 at Relative position (0,0) Set Alarm 0 to 25 Set variable I relative TO 1 Else Destroy the instance

Page 95: การสร้างเกมแนว  Shooting

enemy2

Information about object: enemy2 ศตรแบบทสองจะเคลอนทตาม path ทเราได

ตงไวซงจะตอง Add path ดงน

Page 96: การสร้างเกมแนว  Shooting

enemy2

Sprite: sp_enemy2 Solid: false Visible: true Depth: 0 Persistent: false Parent: enemy Mask: <same as sprite>

Page 97: การสร้างเกมแนว  Shooting

enemy2

Page 98: การสร้างเกมแนว  Shooting

enemy2

Create Event: Set variable hp to 2 Set variable hpfull to hp Set variable power to 40 COMMENT: เซตเขา path ทกำาหนดไว Set the relative path to path_enemy2 with

speed 2 And at the end relative

Page 99: การสร้างเกมแนว  Shooting

กลม island

Information about object: control_island Sprite: <no sprite> Solid: false Visible: true Depth: 0 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 100: การสร้างเกมแนว  Shooting

control_island

Create Event: COMMENT: หนวงเวลาการสราง island Set Alarm 0 to random (180) +60

Page 101: การสร้างเกมแนว  Shooting

control_island

Alarm Event for alarm 0: COMMENT: เมอถงเวลาใหสมสราง island 3 แบบ Create instance of object island, island2, Island3, or <underfined> at position (random (room_width), 0) Set Alarm 0 to random (180) +60

Page 102: การสร้างเกมแนว  Shooting

island1

Information about object: island1 เกาะแบบทหนง เคลอนทลงมาเทากบความเรวพนหลง Sprite: sp_island1 Solid: false Visible: true Depth: 100 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 103: การสร้างเกมแนว  Shooting

island1

Create Event: COMMENT: เคลอนทลง Set the vertical speed to 1

Page 104: การสร้างเกมแนว  Shooting

island1

Other Event: Outside Room: COMMENT: เมอออกนอก room ใหทำาลาย

ทง Destroy the instance

Page 105: การสร้างเกมแนว  Shooting

island2

Information about object: island2 เกาะแบบทสอง เคลอนทตำาลงมาเทากบความเรวพนหลง Sprite: sp_island2 Solid: false Visible: true Depth: 100 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 106: การสร้างเกมแนว  Shooting

island2

Create Event: COMMENT: เคลอนทลง Set the vertical speed to 1

Page 107: การสร้างเกมแนว  Shooting

island2

Other Event: Outside Room: COMMENT: เมอออกนอก room ใหทำาลาย

ทง Destroy the instance

Page 108: การสร้างเกมแนว  Shooting

island3

Information about object: island3 เกาะแบบทสาม เคลอนทตำาลงมาเทากบความเรวพนหลง Sprite: sp_island3 Solid: false Visible: true Depth: 100 Persistent: false Parent: <no parent> Mask: <same as sprite>

Page 109: การสร้างเกมแนว  Shooting

island3

Create Event: COMMENT: เคลอนทลง Set the vertical speed to 1

Page 110: การสร้างเกมแนว  Shooting

island3

Other Event: Outside Room: COMMENT: เมอออกนอก room ใหทำาลาย

ทง Destroy the instance

Page 111: การสร้างเกมแนว  Shooting

วางตำาแหนงออบเจกตใน Room

เมอสรางวตถทกชนเสรจเรยบรอยแลว วางลงใน room ตามตำาแหนงทกำาหนดเปนอนเสรจเรยบรอย

Page 112: การสร้างเกมแนว  Shooting

THE END