1 |
adjustx = 0; |
2 |
adjusty = 0; |
3 |
if (direction == 0) |
4 |
adjustx = 4; |
5 |
if (direction == 180) |
6 |
adjustx = 4; |
7 |
if (direction == 270) |
8 |
adjusty = 4; |
9 |
if (direction == 90) |
10 |
adjusty = 4; |
11 |
draw_sprite(sprite_index, image_index, x + adjustx, y + adjusty); |
12 |
temx2[temno] = x + 10; |
13 |
temy2[temno] = y + 10; |
14 |
xdif = x - (obj_heart.x + 2); |
15 |
ydif = y - (obj_heart.y + 6); |
16 |
if (abs(xdif) < 20 && alarm[0] > 5)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;
} |
17 |
alarm[0] -= 2;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;
} |
18 |
if (abs(ydif) < 20 && alarm[0] > 5)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;
} |
19 |
alarm[0] -= 2;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;
} |
20 |
if (abs(xdif) < 10 && alarm[0] > 4)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;
} |
21 |
alarm[0] = alarm[0] / 2;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;
} |
22 |
if (abs(ydif) < 10 && alarm[0] > 4)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;
} |
23 |
alarm[0] = alarm[0] / 2;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;
} |
24 |
for (i = 0; i < 10; i += 1) |
25 |
{ |
26 |
draw_set_color(c_white); |
27 |
if (temx1[i] > 0) |
28 |
{ |
29 |
ossafe_fill_rectangle(temx1[i], temy1[i], temx2[i], temy2[i]); |
30 |
if (collision_rectangle(temx1[i], temy1[i], temx2[i], temy2[i], obj_heart, 0, 1)) |
31 |
event_user(1); |
32 |
} |
33 |
} |