Information about object: objPlayer
Sprite: sprStand
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
set variable BulletType to 6
Step Event:
execute code: hspeed=0; vspeed=0; 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 hspeed<0 && vspeed=0 { sprite_index = sprWest; BulletType=4; } if hspeed<0 && vspeed<0 { sprite_index =(sprNorthWest); BulletType=3; } if hspeed<0 && vspeed>0 { sprite_index =(sprSouthWest); BulletType=5; } if hspeed>0 && vspeed=0 { sprite_index =(sprEast); BulletType=0; } if hspeed>0 && vspeed<0 { sprite_index =(sprNorthEast); BulletType=1; } if hspeed>0 && vspeed>0 { sprite_index =(sprSouthEast); BulletType=7; } if hspeed=0 && vspeed<0 { sprite_index =(sprNorth); BulletType=2; } if hspeed=0 && vspeed>0 { sprite_index =(sprSouth); BulletType=6; } if hspeed!=0 or vspeed!=0 { image_single=-1; } else { image_single=1; }
set variable ShotTimer relative to -1
Collision Event with object objBullet2:
play sound sound0; looping: false
create instance of object objExplode at relative position (0,0)
for all objRestartRoom: set variable restart to true
destroy the instance
Keyboard Event for <Alt> Key:
if expression ShotTimer<0 is true
create instance of object objOtherBullet at relative position (0,0)
set variable ShotTimer to 5
Keyboard Event for <Space> Key:
if expression ShotTimer<0 is true
create instance of object objBullet at relative position (0,0)
set variable ShotTimer to 25
Key Press Event for X-key Key:
set Alarm 0 to 30
Information about object: objPlayer2Sprite: sprStand
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:set variable ShotTimer to 0set variable BulletType to 6Step Event:execute code: hspeed=0; vspeed=0; if keyboard_check(ord("D")) hspeed=-4; if keyboard_check(ord("G")) hspeed=4; if keyboard_check(ord("R")) vspeed=-4; if keyboard_check(ord("F")) vspeed=4; if hspeed<0 && vspeed=0 { sprite_index =(sprWest); BulletType=4; } if hspeed<0 && vspeed<0 { sprite_index =(sprNorthWest); BulletType=3; } if hspeed<0 && vspeed>0 { sprite_index =(sprSouthWest); BulletType=5; } if hspeed>0 && vspeed=0 { sprite_index =(sprEast); BulletType=0; } if hspeed>0 && vspeed<0 { sprite_index =(sprNorthEast); BulletType=1; } if hspeed>0 && vspeed>0 { sprite_index =(sprSouthEast); BulletType=7; } if hspeed=0 && vspeed<0 { sprite_index =(sprNorth); BulletType=2; } if hspeed=0 && vspeed>0 { sprite_index =(sprSouth); BulletType=6; } if hspeed!=0 or vspeed!=0 { image_single=-1; } else { image_single=1; }set variable ShotTimer relative to -1Collision Event with object objBullet:play sound sound0; looping: falsecreate instance of object objExplode at relative position (0,0)for all objRestartRoom: set variable restart to truedestroy the instanceCollision Event with object objOtherBullet:play sound sound0; looping: falsecreate instance of object objExplode at relative position (0,0)for all objRestartRoom: set variable restart to truedestroy the instanceKeyboard Event for <Ctrl> Key:if expression ShotTimer<0 is truecreate instance of object objBullet2 at relative position (0,0)set variable ShotTimer to 25Information about object: objBulletSprite: sprBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:execute code: if objPlayer.BulletType=4 sprite_index =(sprBulletW); if objPlayer.BulletType=3 sprite_index =(sprBulletNW); if objPlayer.BulletType=5 sprite_index =(sprBulletSW); if objPlayer.BulletType=0 sprite_index =(sprBulletE); if objPlayer.BulletType=1 sprite_index =(sprBulletNE); if objPlayer.BulletType=7 sprite_index =(sprBulletSE); if objPlayer.BulletType=2 sprite_index =(sprBulletN); if objPlayer.BulletType=6 sprite_index =(sprBulletS);set speed to 8 and direction to objPlayer.BulletType*45Other Event: Outside Room:destroy the instanceInformation about object: objBullet2Sprite: sprBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:execute code: if objPlayer2.BulletType=4 sprite_index =(sprBulletW); if objPlayer2.BulletType=3 sprite_index =(sprBulletNW); if objPlayer2.BulletType=5 sprite_index =(sprBulletSW); if objPlayer2.BulletType=0 sprite_index =(sprBulletE); if objPlayer2.BulletType=1 sprite_index =(sprBulletNE); if objPlayer2.BulletType=7 sprite_index =(sprBulletSE); if objPlayer2.BulletType=2 sprite_index =(sprBulletN); if objPlayer2.BulletType=6 sprite_index =(sprBulletS);set speed to 8 and direction to objPlayer2.BulletType*45Other Event: Outside Room:destroy the instanceInformation about object: objExplodeSprite: sprExplodeE
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:execute code: if objPlayer2.BulletType=4 sprite_index =(sprExplodeW); if objPlayer2.BulletType=3 sprite_index =(sprExplodeNW); if objPlayer2.BulletType=5 sprite_index =(sprExplodeSW); if objPlayer2.BulletType=0 sprite_index =(sprExplodeE); if objPlayer2.BulletType=1 sprite_index =(sprExplodeNE); if objPlayer2.BulletType=7 sprite_index =(sprExplodeSE); if objPlayer2.BulletType=2 sprite_index =(sprExplodeN); if objPlayer2.BulletType=6 sprite_index =(sprExplodeS);Other Event: Animation End:destroy the instanceInformation about object: objOtherBulletSprite: sprBullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:set speed to 8 and direction to objPlayer.BulletType*45Information about object: objRestartRoomSprite:
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask: No Physics ObjectCreate Event:set variable restart to falseAlarm Event for alarm 0:Restart the current roomAlarm Event for alarm 1:play sound sound1; looping: falseset Alarm 1 to 10Step Event:if restart is equal to trueset Alarm 0 to 30set Alarm 1 to 10set variable restart to false
No comments:
Post a Comment