Undertale script viewer

← back to main script listing

gml_Object_blt_temhand_Create_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_tembody))
2
    obj_tembody.atk = 1;
3
i = 0;
4
repeat (10)
5
{
6
    temdir[i] = 0;
7
    temtim[i] = 0;
8
    temx1[i] = 0;
9
    temx2[i] = 0;
10
    temy1[i] = 0;
11
    temy2[i] = 0;
12
    i += 1;
13
}
14
speed = 4;
15
temx1[0] = x;
16
temx2[0] = x + 9;
17
temy1[0] = y;
18
temy[0] = y + 9;
19
temdir[0] = 270;
20
direction = temdir[0];
21
alarm[0] = 20 + random(20);
gml_Object_blt_temhand_Alarm_0.gml

if (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
temtim[0] = 90;
23
temno = 0;
24
turned = 0;