Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_animator_Step_0

(view raw script w/o annotations or w/e)
1
if (i_ex(target))
2
{
3
    if (con == 0)
4
    {
5
        target.image_index = 0;
6
        target.image_speed = 0;
7
        if (sprite >= 0)
8
            target.sprite_index = sprite;
9
        if (initframe >= 0)
10
        {
11
            target.image_index = initframe;
12
            fake_image_index = initframe;
13
        }
14
        fake_image_index_max = endframe;
15
        if (endframe == 0)
16
            fake_image_index_max = target.image_number - 1 - target.image_index;
17
        if (endframe == -1)
18
            fake_image_index_max = target.image_number - target.image_index;
19
        con = 1;
20
    }
21
    if (con == 1)
22
    {
23
        fake_image_index += fake_image_speed;
24
        target.image_index = fake_image_index;
25
        if (fake_image_index >= fake_image_index_max)
26
            instance_destroy();
27
    }
28
}
29
else
30
{
31
    instance_destroy();
32
}