You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
131 lines
3.3 KiB
131 lines
3.3 KiB
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName>sSMissile</spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>0</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>visible = 0;
|
|
can_camera = 1;
|
|
|
|
velocity_x = 0;
|
|
velocity_y = 0;
|
|
</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>// basic camera buttons
|
|
if (keyboard_check(ord("A"))){
|
|
velocity_x -= 1;
|
|
}
|
|
|
|
if (keyboard_check(ord("D"))){
|
|
velocity_x += 1;
|
|
}
|
|
|
|
if (keyboard_check(ord("W"))){
|
|
velocity_y -= 1;
|
|
}
|
|
|
|
if (keyboard_check(ord("S"))){
|
|
velocity_y += 1;
|
|
}
|
|
|
|
if (!keyboard_check(ord("A")) && !keyboard_check(ord("D"))){
|
|
if !(velocity_x == 0){
|
|
if (velocity_x > 0){
|
|
velocity_x -= 1;
|
|
}else{
|
|
velocity_x += 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (!keyboard_check(ord("W")) && !keyboard_check(ord("S"))){
|
|
if !(velocity_y == 0){
|
|
if (velocity_y > 0){
|
|
velocity_y -= 1;
|
|
}else{
|
|
velocity_y += 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
if ((instance_exists(oEditorInfo))){
|
|
velocity_x = 0;
|
|
velocity_y = 0;
|
|
}
|
|
|
|
// clamps
|
|
var x_t = 3;
|
|
if (keyboard_check(vk_shift)) then x_t = 9;
|
|
velocity_x = clamp(velocity_x,-x_t,x_t);
|
|
velocity_y = clamp(velocity_y,-x_t,x_t);
|
|
|
|
// move the camera!
|
|
x += velocity_x;
|
|
y += velocity_y;
|
|
|
|
// .. and cap it at the edges!
|
|
if (x < 160) then x = 160;
|
|
if (x > room_width-160) then x = room_width-160;
|
|
if (y < 120) then y = 120;
|
|
if (y > room_height-120) then y = room_height-120;
|
|
</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>
|