More work on ice missiles and enemy behavior

cleaner
milesthenerd 5 years ago
parent 8cd8a1a60a
commit 3f09beb311

@ -4585,6 +4585,14 @@
<sprite>sprites\sIceMissileTrail</sprite>
<sprite>sprites\sIMPickup</sprite>
<sprite>sprites\sGUIIceMissile</sprite>
<sprite>sprites\sGunzooArmor1Frozen</sprite>
<sprite>sprites\sGunzooArmor2Frozen</sprite>
<sprite>sprites\sGunzooTurnFrozen</sprite>
<sprite>sprites\sShirkArmor1Frozen</sprite>
<sprite>sprites\sShirkArmor2Frozen</sprite>
<sprite>sprites\sShirkTurnArmor1Frozen</sprite>
<sprite>sprites\sShirkTurnArmor2Frozen</sprite>
<sprite>sprites\sShirkTurnFrozen</sprite>
</sprites>
</sprites>
<backgrounds name="background">

@ -277,6 +277,14 @@ if (!flashing) {
draw_sprite_ext(clawspr, -1, x - clawx, y + clawy, -1, 1, 360 - clawangle, -1, image_alpha);
draw_sprite_ext(clawspr, -1, x + clawx, y + clawy, 1, 1, clawangle, -1, image_alpha);
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (frozen &gt; 0 &amp;&amp; frozen &lt; freezetime * 0.2){
draw_set_blend_mode(bm_add);
draw_sprite_ext(fangspr, -1, x, y + fangy, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
draw_sprite_ext(clawspr, -1, x - clawx, y + clawy, -1, 1, 360 - clawangle, -1, 1 - fxtimer * 0.25);
draw_sprite_ext(clawspr, -1, x + clawx, y + clawy, 1, 1, clawangle, -1, 1 - fxtimer * 0.25);
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
draw_set_blend_mode(bm_normal);
}
} else if (flashing) {
draw_sprite_ext(fangspr, -1, x, y + fangy, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), image_alpha);
draw_set_blend_mode(bm_add);

@ -1774,6 +1774,7 @@ switch(type_event){
var clientMapY = buffer_read(_buffer, buffer_s16);
var findsocket = ds_list_find_index(roomList, clientID);
/*
if(instance_exists(oCharacter)){
if(clientRoom == rm_death){
if(oCharacter.state != oCharacter.DEFEATED){
@ -1784,6 +1785,7 @@ switch(type_event){
}
}
}
*/
if(clientRoom == room &amp;&amp; global.clientID != clientID){
sameRoom = true;

@ -485,6 +485,8 @@ if(!file_exists(working_directory + "\dictionary.json")){
}
global.icemissiles = 1;
global.clientID = 0;
global.currentweapon = 0;
</string>
</argument>
</arguments>

@ -631,13 +631,13 @@ instance_destroy();
<kind>1</kind>
<string>if((other.object_index == oMissile || other.object_index == oMissileExpl) &amp;&amp; global.icemissiles &amp;&amp; !other.smissile){
if(canfreeze){
frozen = 180;
if(other.damage &gt; myhealth || ceil(other.damage / 2) &gt; myhealth){
if(other.damage &gt; myhealth &amp;&amp; !frozen || ceil(other.damage / 2) &gt; myhealth &amp;&amp; !frozen){
dmg = 0;
myhealth = 1;
} else {
dmg = other.damage;
}
frozen = 180;
} else {
dmg = other.damage;
}

@ -381,10 +381,17 @@ prevhealth = myhealth;
<kind>1</kind>
<string>armor1 = sGunzooArmor1;
armor2 = sGunzooArmor2;
turn = sGunzooTurn;
if (frozen) {
myspr = frozenspr;
armor1 = sGunzooArmor1Frozen;
armor2 = sGunzooArmor2Frozen;
turn = sGunzooTurnFrozen;
} else {
myspr = sprite_index;
armor1 = sGunzooArmor1;
armor2 = sGunzooArmor2;
turn = sGunzooTurn;
}
if (!flashing) {
if (turning == 0) {
@ -392,23 +399,33 @@ if (!flashing) {
if (phase == 0) draw_sprite_ext(armor1, -1, x, y - aoffset, facing, 1, image_angle, -1, 1);
if (phase &lt;= 1) draw_sprite_ext(armor2, -1, x + aoffset, y, facing, 1, image_angle, -1, 1);
}
if (turning &gt; 0) draw_sprite_ext(sGunzooTurn, -1, x, y, facing, 1, image_angle, -1, 1);
if (turning &gt; 0) draw_sprite_ext(turn, -1, x, y, facing, 1, image_angle, -1, 1);
if (frozen &gt; 0 &amp;&amp; frozen &lt; freezetime * 0.2){
draw_set_blend_mode(bm_add);
if (turning == 0) {
draw_sprite_ext(myspr, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.35);
if (phase == 0) draw_sprite_ext(armor1, -1, x, y - aoffset, facing, 1, image_angle, -1, 1 - fxtimer * 0.40);
if (phase &lt;= 1) draw_sprite_ext(armor2, -1, x + aoffset, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.40);
}
if (turning &gt; 0) draw_sprite_ext(turn, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.35);
draw_set_blend_mode(bm_normal);
}
}
if (flashing || (frozen &gt; 0 &amp;&amp; frozen &lt; freezetime * 0.2)) {
if (flashing) {
if (turning == 0) {
draw_sprite_ext(myspr, -1, x, y, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (phase == 0) draw_sprite_ext(armor1, -1, x, y - aoffset, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (phase &lt;= 1) draw_sprite_ext(armor2, -1, x + aoffset, y, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
}
if (turning &gt; 0) draw_sprite_ext(sGunzooTurn, -1, x, y, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (turning &gt; 0) draw_sprite_ext(turn, -1, x, y, facing, 1, image_angle, make_color_rgb(80, 80, 80), 1);
draw_set_blend_mode(bm_add);
repeat (3) {
repeat (2) {
if (turning == 0) {
draw_sprite_ext(myspr, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (phase == 0) draw_sprite_ext(armor1, -1, x, y - aoffset, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (phase &lt;= 1) draw_sprite_ext(armor2, -1, x + aoffset, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
if (turning &gt; 0) draw_sprite_ext(sGunzooTurn, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (turning &gt; 0) draw_sprite_ext(turn, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
}

@ -361,49 +361,82 @@ if (random(2) &lt; 0.2) instance_create(x, y, oDebris);
<arguments>
<argument>
<kind>1</kind>
<string>action_inherited();
<string>armor1 = sShirkArmor1;
armor2 = sShirkArmor2;
turn = sShirkTurn;
armor1turn = sShirkTurnArmor1;
armor2turn = sShirkTurnArmor2;
if (frozen) {
myspr = frozenspr;
armor1 = sShirkArmor1Frozen;
armor2 = sShirkArmor2Frozen;
turn = sShirkTurnFrozen;
armor1turn = sShirkTurnArmor1Frozen;
armor2turn = sShirkTurnArmor2Frozen;
} else {
myspr = sprite_index;
armor1 = sShirkArmor1;
armor2 = sShirkArmor2;
turn = sShirkTurn;
armor1turn = sShirkTurnArmor1;
armor2turn = sShirkTurnArmor2;
}
image_xscale = facing;
if (frozen == 0){
image_speed = 0.5;
if (!flashing) {
if (turning == 0) {
draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell1hp) draw_sprite_ext(sShirkArmor1, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell2hp) draw_sprite_ext(sShirkArmor2, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
}
if (turning &gt; 0) {
draw_sprite_ext(sShirkTurn, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell1hp) draw_sprite_ext(sShirkTurnArmor1, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell2hp) draw_sprite_ext(sShirkTurnArmor2, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
}
}
if (flashing) {
if (turning == 0) {
draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell1hp) draw_sprite_ext(sShirkArmor1, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell2hp) draw_sprite_ext(sShirkArmor2, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
} else image_speed = 0;
if (!flashing) {
if (turning == 0) {
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (frozen &gt; 0 &amp;&amp; frozen &lt; freezetime * 0.2){
draw_set_blend_mode(bm_add);
repeat (3) {
draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell1hp) draw_sprite_ext(sShirkArmor1, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell2hp) draw_sprite_ext(sShirkArmor2, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.35);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.35);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.35);
draw_set_blend_mode(bm_normal);
}
if (turning &gt; 0) {
draw_sprite_ext(sShirkTurn, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell1hp) draw_sprite_ext(sShirkTurnArmor1, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell2hp) draw_sprite_ext(sShirkTurnArmor2, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
}
if (turning &gt; 0) {
draw_sprite_ext(turn, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1turn, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2turn, -1, x, y, image_xscale, 1, image_angle, -1, image_alpha);
if (frozen &gt; 0 &amp;&amp; frozen &lt; freezetime * 0.2){
draw_set_blend_mode(bm_add);
repeat (3) {
draw_sprite_ext(sprite_index, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell1hp) draw_sprite_ext(sShirkTurnArmor1, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell2hp) draw_sprite_ext(sShirkTurnArmor2, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
draw_sprite_ext(turn, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.35);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1turn, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.35);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2turn, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.35);
draw_set_blend_mode(bm_normal);
}
} // if (flashing)
}
}
if (flashing) {
if (turning == 0) {
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
draw_set_blend_mode(bm_add);
repeat (2) {
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
}
if (turning &gt; 0) {
draw_sprite_ext(turn, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1turn, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2turn, -1, x, y, image_xscale, 1, image_angle, make_color_rgb(80, 80, 80), 1);
draw_set_blend_mode(bm_add);
repeat (2) {
draw_sprite_ext(myspr, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell1hp) draw_sprite_ext(armor1turn, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
if (myhealth &gt; shell2hp) draw_sprite_ext(armor2turn, -1, x, y, image_xscale, 1, image_angle, -1, 1 - fxtimer * 0.25);
}
draw_set_blend_mode(bm_normal);
}
} // if (flashing)
/*
if (!flashing) {
if (turning == 0) {

@ -1,4 +1,6 @@
/// shoot_missile(direction)
var missileX = 0;
var missileY = 0;
if (global.currentweapon == 1 && global.missiles > 0 || global.currentweapon == 2 && global.smissiles > 0) {
msl = instance_create(x + aspr2x, y + aspr2y, oMissile);
msl.direction = argument0;
@ -15,8 +17,8 @@ if (global.currentweapon == 1 && global.missiles > 0 || global.currentweapon ==
msl.y += 4;
if (facing == LEFT) msl.x += 1;
}
var missileX = msl.x;
var missileY = msl.y;
missileX = msl.x;
missileY = msl.y;
msl.smissile = global.currentweapon == 2;
if (global.currentweapon == 1) {
global.missiles -= 1;
@ -55,8 +57,8 @@ if (global.currentweapon == 1 && global.missiles > 0 || global.currentweapon ==
if (global.currentweapon == 2 && global.smissiles == 0) global.currentweapon = 1;
if (global.currentweapon == 1 && global.missiles == 0) global.currentweapon = 0;
if(instance_exists(oClient)){
if(ds_list_size(oClient.roomListData) > 0){
if(instance_exists(oClient) && missileX != 0 && missileY != 0){
if(ds_list_size(oClient.roomListData) >= 0){
var size, type, alignment;
size = 1024;
type = buffer_grow;

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>14</xorig>
<yorigin>17</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>0</bbox_left>
<bbox_right>18</bbox_right>
<bbox_top>0</bbox_top>
<bbox_bottom>9</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>19</width>
<height>10</height>
<frames>
<frame index="0">images\sGunzooArmor1Frozen_0.png</frame>
</frames>
</sprite>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>18</xorig>
<yorigin>14</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>0</bbox_left>
<bbox_right>14</bbox_right>
<bbox_top>0</bbox_top>
<bbox_bottom>25</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>15</width>
<height>26</height>
<frames>
<frame index="0">images\sGunzooArmor2Frozen_0.png</frame>
</frames>
</sprite>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>8</xorig>
<yorigin>13</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>0</bbox_left>
<bbox_right>21</bbox_right>
<bbox_top>0</bbox_top>
<bbox_bottom>26</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>22</width>
<height>27</height>
<frames>
<frame index="0">images\sGunzooTurnFrozen_0.png</frame>
</frames>
</sprite>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>12</xorig>
<yorigin>15</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>8</bbox_left>
<bbox_right>25</bbox_right>
<bbox_top>14</bbox_top>
<bbox_bottom>28</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>32</width>
<height>32</height>
<frames>
<frame index="0">images\sShirkArmor1Frozen_0.png</frame>
</frames>
</sprite>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>12</xorig>
<yorigin>15</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>1</bbox_left>
<bbox_right>20</bbox_right>
<bbox_top>8</bbox_top>
<bbox_bottom>28</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>32</width>
<height>32</height>
<frames>
<frame index="0">images\sShirkArmor2Frozen_0.png</frame>
</frames>
</sprite>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>10</xorig>
<yorigin>15</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>7</bbox_left>
<bbox_right>23</bbox_right>
<bbox_top>16</bbox_top>
<bbox_bottom>26</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>32</width>
<height>32</height>
<frames>
<frame index="0">images\sShirkTurnArmor1Frozen_0.png</frame>
</frames>
</sprite>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>10</xorig>
<yorigin>15</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>4</bbox_left>
<bbox_right>24</bbox_right>
<bbox_top>9</bbox_top>
<bbox_bottom>28</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>32</width>
<height>32</height>
<frames>
<frame index="0">images\sShirkTurnArmor2Frozen_0.png</frame>
</frames>
</sprite>

@ -0,0 +1,25 @@
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<sprite>
<type>0</type>
<xorig>10</xorig>
<yorigin>15</yorigin>
<colkind>1</colkind>
<coltolerance>0</coltolerance>
<sepmasks>0</sepmasks>
<bboxmode>0</bboxmode>
<bbox_left>4</bbox_left>
<bbox_right>23</bbox_right>
<bbox_top>0</bbox_top>
<bbox_bottom>31</bbox_bottom>
<HTile>0</HTile>
<VTile>0</VTile>
<TextureGroups>
<TextureGroup0>0</TextureGroup0>
</TextureGroups>
<For3D>0</For3D>
<width>32</width>
<height>32</height>
<frames>
<frame index="0">images\sShirkTurnFrozen_0.png</frame>
</frames>
</sprite>

@ -21,5 +21,8 @@
<height>33</height>
<frames>
<frame index="0">images\sWallfireFrozen_0.png</frame>
<frame index="1">images\sWallfireFrozen_1.png</frame>
<frame index="2">images\sWallfireFrozen_2.png</frame>
<frame index="3">images\sWallfireFrozen_3.png</frame>
</frames>
</sprite>

Loading…
Cancel
Save