Information about object: objPlayer
Sprite: sprPlayer
Solid: false
Visible: true
Depth: 0
Persistent: true
Parent:
Children:
Mask:
Solid: false
Visible: true
Depth: 0
Persistent: true
Parent:
Children:
Mask:
No Physics Object
Create Event:
set variable ShotTimer to 0
set the number of lives to 3
set variable global.ShieldTimer to 1500
Step Event:
execute code:
hspeed=0;
vspeed=0;
ShotTimer-=1;
if keyboard_check(vk_left) hspeed=-4;
if keyboard_check(vk_right) hspeed=4;
if keyboard_check(vk_up) vspeed=-4;
if keyboard_check(vk_down) vspeed=4;
if keyboard_check(ord("S")) and global.ShieldTimer>0 { 
  if instance_number(objShield)=0 {  
    instance_create(x+sprite_width+48,y,objShield);
  }
} else {
  with (objShield) instance_destroy();
}
if (x<5) x=5;
if (x>550)x=550;
if (y<5) y=5;
if (y>350)y=350;
if keyboard_check(vk_space) {
  if ShotTimer<0 {
    instance_create (x+sprite_width,y+sprite_height/2,objPlayerBullet);
    ShotTimer=10;
  }
}
Collision Event with object objEnemy:
create instance of object objExplode at relative position (0,0)
play sound sndExplode; looping: false
for all objEnemy: destroy the instance
for all objEnemyBullet: destroy the instance
set the number of lives relative to -1
Collision Event with object objEnemyBullet:
create instance of object objExplode at relative position (0,0)
play sound sndExplode; looping: false
for all objEnemy: destroy the instance
for all objEnemyBullet: destroy the instance
set the number of lives relative to -1
Other Event: No More Lives:
if the player does say yes to the question: Game Over## Would you like to play again?
Restart the current room
else
end the game
Information about object: objEnemySprite: sprEnemy
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:start moving in directions 000100000 with speed set to 4Step Event:execute code: if floor(random(50))=1 { instance_create(x,y+sprite_height/2,objEnemyBullet); }Collision Event with object objPlayerBullet:create instance of object objExplode at relative position (0,0)destroy the instancefor other object: destroy the instanceplay sound sndExplode; looping: falseset the score relative to 10Other Event: Outside Room:destroy the instanceInformation about object: objEnemyControllerSprite: sprController
Solid: false
Visible: false
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:set Alarm 0 to room_speedAlarm Event for alarm 0:create instance of object objEnemy at position (display_get_width(),random(room_height-96))set Alarm 0 to random(room_speed*2)Information about object: objPlayerBulletSprite: sprPlayerBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:start moving in directions 000001000 with speed set to 8Other Event: Outside Room:destroy the instanceInformation about object: objEnemyBulletSprite: sprEnemyBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:start moving in directions 000100000 with speed set to 8Other Event: Outside Room:destroy the instanceInformation about object: objExplodeSprite: sprExplode
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectOther Event: Animation End:destroy the instanceInformation about object: objShieldSprite: sprShield
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectStep Event:execute code: global.ShieldTimer-=1; if (global.ShieldTimer<1) instance_destroy(); x=objPlayer.x+65; y=objPlayer.y;Collision Event with object objEnemy:for other object: destroy the instanceCollision Event with object objEnemyBullet:for other object: destroy the instance
No comments:
Post a Comment