1 |
if (temno < 8) |
2 |
{ |
3 |
temno += 1; |
4 |
temx1[temno] = x; |
5 |
temy1[temno] = y; |
6 |
xdif = x - (obj_heart.x + 6); |
7 |
ydif = y - (obj_heart.y + 6); |
8 |
final = abs(xdif) - abs(ydif); |
9 |
if (final <= 0) |
10 |
{ |
11 |
if (ydif >= 0) |
12 |
direction = 90; |
13 |
else |
14 |
direction = 270; |
15 |
} |
16 |
else if (xdif >= 0) |
17 |
{ |
18 |
direction = 180; |
19 |
} |
20 |
else |
21 |
{ |
22 |
direction = 0; |
23 |
} |
24 |
temdir[temno] = direction; |
25 |
if (temdir[temno] == (temdir[temno - 1] + 180) || temdir[temno] == (temdir[temno - 1] - 180)) |
26 |
{ |
27 |
direction -= 90; |
28 |
temdir[temno] -= 90; |
29 |
} |
30 |
if (temdir[temno] == temdir[temno - 1]) |
31 |
{ |
32 |
temx1[temno] = 0; |
33 |
temno -= 1; |
34 |
} |
35 |
if (temno > 0) |
36 |
{ |
37 |
if (direction == 90 && temdir[temno - 1] == 180) |
38 |
temx2[temno - 1] = x; |
39 |
if (direction == 180 && temdir[temno - 1] == 90) |
40 |
temy2[temno - 1] = y; |
41 |
} |
42 |
alarm[0] = 60 + random(20);gml_Object_blt_temhand_Alarm_0.gmlif (temno < 8)
{
temno += 1;
temx1[temno] = x;
temy1[temno] = y;
xdif = x - (obj_heart.x + 6);
ydif = y - (obj_heart.y + 6);
final = abs(xdif) - abs(ydif);
if (final <= 0)
{
if (ydif >= 0)
direction = 90;
else
direction = 270;
}
else if (xdif >= 0)
{
direction = 180;
}
else
{
direction = 0;
}
temdir[temno] = direction;
if (temdir[temno] == (temdir[temno - 1] + 180) || temdir[temno] == (temdir[temno - 1] - 180))
{
direction -= 90;
temdir[temno] -= 90;
}
if (temdir[temno] == temdir[temno - 1])
{
temx1[temno] = 0;
temno -= 1;
}
if (temno > 0)
{
if (direction == 90 && temdir[temno - 1] == 180)
temx2[temno - 1] = x;
if (direction == 180 && temdir[temno - 1] == 90)
temy2[temno - 1] = y;
}
alarm[0] = 60 + random(20);
temtim[temno] = alarm[0];
}
else
{
alarm[1] = 1;
} |
43 |
temtim[temno] = alarm[0];gml_Object_blt_temhand_Alarm_0.gmlif (temno < 8)
{
temno += 1;
temx1[temno] = x;
temy1[temno] = y;
xdif = x - (obj_heart.x + 6);
ydif = y - (obj_heart.y + 6);
final = abs(xdif) - abs(ydif);
if (final <= 0)
{
if (ydif >= 0)
direction = 90;
else
direction = 270;
}
else if (xdif >= 0)
{
direction = 180;
}
else
{
direction = 0;
}
temdir[temno] = direction;
if (temdir[temno] == (temdir[temno - 1] + 180) || temdir[temno] == (temdir[temno - 1] - 180))
{
direction -= 90;
temdir[temno] -= 90;
}
if (temdir[temno] == temdir[temno - 1])
{
temx1[temno] = 0;
temno -= 1;
}
if (temno > 0)
{
if (direction == 90 && temdir[temno - 1] == 180)
temx2[temno - 1] = x;
if (direction == 180 && temdir[temno - 1] == 90)
temy2[temno - 1] = y;
}
alarm[0] = 60 + random(20);
temtim[temno] = alarm[0];
}
else
{
alarm[1] = 1;
} |
44 |
} |
45 |
else |
46 |
{ |
47 |
alarm[1] = 1;gml_Object_blt_temhand_Alarm_1.gmldirection = temdir[temno] - 180;
speed = 12;
if (direction == 0)
{
if (x >= (temx1[temno] - 6))
{
temx1[temno] = 0;
temno -= 1;
x = temx2[temno] - 22;
y += 4;
}
}
if (direction == 180)
{
if (x <= (temx1[temno] + 6))
{
temx1[temno] = 0;
temno -= 1;
x = temx2[temno] + 2;
}
}
if (direction == 270)
{
if (y >= (temy1[temno] - 6))
{
temx1[temno] = 0;
temno -= 1;
y = temy2[temno] - 22;
}
}
if (direction == 90)
{
if (y <= (temy1[temno] + 6))
{
temx1[temno] = 0;
temno -= 1;
x += 4;
y = temy2[temno] + 2;
}
}
alarm[1] = 1;
if (temno < 4 && global.turntimer < 2 && turned == 0)
{
turned = 1;
global.turntimer = -1;
global.mnfight = 3;
}
if (instance_number(object_index) > 1)
instance_destroy();
if (temno == 0 && y < (ystart + 25))
{
temno = 0;
if (instance_exists(obj_tembody))
obj_tembody.atk = 0;
instance_destroy();
} |
48 |
} |