<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!--> <object> <spriteName>spr_player</spriteName> <solid>0</solid> <visible>-1</visible> <depth>-100</depth> <persistent>0</persistent> <parentName><undefined></parentName> <maskName><undefined></maskName> <events> <event eventtype="0" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>/// Player creation code. ship_type = 0; image_speed = 0; image_index = ship_type; is_moving = false; dead = false; invuln_counter_max = 1*room_speed; invuln_counter = invuln_counter_max; energy_max = 500; energy = energy_max hp_max = 100; hp = hp_max; </string> </argument> </arguments> </action> </event> <event eventtype="3" enumb="0"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>/// Player per frame if(dead == true) { gravity = 0; speed = 0; direction = 0; return 0; } if(hp <= 0 && !dead) { speed = 0; direction = 0; instance_create(x,y,obj_boom_fx); sprite_index = spr_boom; image_speed = 1; dead = true; } direction = image_angle speed = floor(speed); if(speed < 0) { speed += 1; } if(speed > 0) { speed -= 1 } if(energy >= 10 && is_moving && keyboard_check(vk_shift)) { if(speed > 30) { speed = 30; } energy -= 10; } else { if(speed > 20) { speed = 20; } } view_xview[0] = x - view_wview[0]/2; view_yview[0] = y - view_hview[0]/2; if(!is_moving) { if(energy < energy_max) { energy += 5; } } if(invuln_counter == invuln_counter_max) { visible = true;; } if(invuln_counter != invuln_counter_max) { if(invuln_counter % 5 == 0) { visible = !visible; } invuln_counter ++; } </string> </argument> </arguments> </action> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>///pull_towards_black_holes(); pull_towards_black_holes(); </string> </argument> </arguments> </action> </event> <event eventtype="4" ename="obj_dropped_item"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>var didAdd = add_item_to_inventory(other.item_id); if(didAdd) { instance_destroy(other); } </string> </argument> </arguments> </action> </event> <event eventtype="4" ename="obj_black_hole"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>damage_player(hp_max); </string> </argument> </arguments> </action> </event> <event eventtype="4" ename="obj_asteriod"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>damage_player(5); instance_create(other.x,other.y,obj_boom_fx); other.direction = direction; other.image_angle = image_angle; other.speed = 20; speed = -20; </string> </argument> </arguments> </action> </event> <event eventtype="5" enumb="87"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>if(dead == true || speed < 0) { return 0; } direction = image_angle speed += 5 </string> </argument> </arguments> </action> </event> <event eventtype="5" enumb="68"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>if(dead == true) { return 0; } image_angle -= 5; </string> </argument> </arguments> </action> </event> <event eventtype="5" enumb="65"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>if(dead == true) { return 0; } image_angle += 5; </string> </argument> </arguments> </action> </event> <event eventtype="6" enumb="53"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>if(dead == true) { return 0; } if(obj_inv_controller.is_open) { return 0; } if(energy >= 20) { var new_bullet = instance_create(x,y,obj_bullet); audio_play_sound(snd_shoot,2,false); new_bullet.image_angle = image_angle; new_bullet.direction = image_angle; new_bullet.speed = speed + 5; energy -= 20; } </string> </argument> </arguments> </action> </event> <event eventtype="7" enumb="7"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>/// Show Game over screen if(dead == false) { return 0; } visible = false; obj_controller.visible = false; image_speed = 0; instance_create(view_xview[0]+(view_wview[0]/2),view_yview[0]+(view_hview[0]/2),obj_gameover_overlay); instance_create(view_xview[0]+(view_wview[0]/2),view_yview[0]+(view_hview[0]/2),obj_respawn); </string> </argument> </arguments> </action> </event> <event eventtype="9" enumb="123"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>if(global.debug) { ship_type +=2; image_index = ship_type; } </string> </argument> </arguments> </action> </event> <event eventtype="9" enumb="87"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>if(dead == true) { return 0; } is_moving = true; audio_play_sound(snd_engine,1,true); image_index = ship_type+1; </string> </argument> </arguments> </action> </event> <event eventtype="10" enumb="87"> <action> <libid>1</libid> <id>603</id> <kind>7</kind> <userelative>0</userelative> <isquestion>0</isquestion> <useapplyto>-1</useapplyto> <exetype>2</exetype> <functionname></functionname> <codestring></codestring> <whoName>self</whoName> <relative>0</relative> <isnot>0</isnot> <arguments> <argument> <kind>1</kind> <string>if(dead == true) { return 0; } is_moving = false; audio_stop_sound(snd_engine) image_index = ship_type; </string> </argument> </arguments> </action> </event> </events> <PhysicsObject>0</PhysicsObject> <PhysicsObjectSensor>0</PhysicsObjectSensor> <PhysicsObjectShape>0</PhysicsObjectShape> <PhysicsObjectDensity>0.5</PhysicsObjectDensity> <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution> <PhysicsObjectGroup>0</PhysicsObjectGroup> <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping> <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping> <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction> <PhysicsObjectAwake>-1</PhysicsObjectAwake> <PhysicsObjectKinematic>0</PhysicsObjectKinematic> <PhysicsShapePoints/> </object>