Undertale script viewer

← back to main script listing

gml_Object_obj_undynespear_anim1_Step_0

(view raw script w/o annotations or w/e)
1
if (part == 1)
2
{
3
    sprite_index = spr_undynespear;
4
    scr_getideal
scr_getideal

idealxx1 = x; idealyy1 = y; idealxx2 = argument0; idealyy2 = argument1; idealstep = 0;
(obj_mainchara.x - 13, obj_mainchara.y - 5);
5
    part = 2;
6
    alarm[4] = 16;
7
    image_angle -= 450;
8
    curangle = image_angle;
9
    ss = 0;
10
}
11
if (part == 2)
12
{
13
    ss += 1;
14
    scr_moveideal
scr_moveideal

if (argument0 > 0) { if (idealstep < argument0) idealstep += 1; idealxdist = (idealxx2 - x) / argument0; idealydist = (idealyy2 - y) / argument0; x += (idealxdist * idealstep); y += (idealydist * idealstep); }
(16);
15
    image_angle += 10;
16
}
17
if (part == 3)
18
{
19
    image_angle = 140;
20
    instance_create(210, 155, obj_controlspear);
21
    instance_destroy();
22
}