Information about object: objPlayer
Sprite: sprPlayer
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
set variable ShotTimer to 0
Step Event:
set variable ShotTimer relative to -1
Keyboard Event for <no key> Key:
set the horizontal speed to 0
Keyboard Event for <Space> Key:
if expression ShotTimer<0 is true
create instance of object objPBullet at relative position (sprite_width/2,0)
set variable ShotTimer to 4
Keyboard Event for <Left> Key:
set the horizontal speed to -4
Keyboard Event for <Right> Key:
set the horizontal speed to 4
Information about object: objEnemySprite: sprEnemy
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:set variable hits to 4start moving in directions 010000000 with speed set to 3Step Event:execute code: a=round(random(20)); if a=1 { if self.hspeed!=0 { self.hspeed=0; } else { self.hspeed=random(10)-5; } sprite_index = (sprEnemy); a=round(random(10)); if a=1 { self.hspeed=0; } if self.hspeed<0 { sprite_index =(sprEnemyLeft); } if self.hspeed>0 { sprite_index =(sprEnemyRight); } } if x<objPlayer.x+45 and x>objPlayer.x { instance_create(30+self.x, self.y, objBullet); }Collision Event with object objPBullet:for other object: destroy the instanceset variable hits relative to -1if expression hits=0 is truedestroy the instanceOther Event: Intersect Boundary:destroy the instanceInformation about object: objControllerSprite: sprController
Solid: false
Visible: false
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:set Alarm 0 to 30Alarm Event for alarm 0:set Alarm 0 to 100create instance of object objEnemy at position (random(window_get_width()-100)+50,0)Information about object: objBulletSprite: sprBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:if expression instance_number(objBullet)>1 is truedestroy the instancestart moving in directions 010000000 with speed set to 12Other Event: Intersect Boundary:destroy the instanceInformation about object: objPBulletSprite: sprPBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:start moving in directions 000000010 with speed set to 8
No comments:
Post a Comment