Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_anim_custom_Step_0

(view raw script w/o annotations or w/e)
1
if (target_obj == -4)
2
    exit;
3
if (!anim_active)
4
    exit;
5
anim_timer--;
6
if (anim_timer <= 0)
7
{
8
    anim_index++;
9
    if (anim_index < array_length(anim_timestamps))
10
    {
11
        anim_timer = anim_timestamps[anim_index] / anim_modifier;
12
        target_obj.image_index = anim_index;
13
        trigger_event("frame_change", anim_index);
14
    }
15
    else
16
    {
17
        stop();
18
    }
19
}