Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_move_actor_Step_0

(view raw script w/o annotations or w/e)
1
if (i_ex(target))
2
{
3
    if (init == 0)
4
    {
5
        init = 1;
6
        if (direction_word != "nothing")
7
        {
8
            if (direction_word == "l")
9
                direction = 180;
10
            if (direction_word == "d")
11
                direction = 270;
12
            if (direction_word == "r")
13
                direction = 0;
14
            if (direction_word == "u")
15
                direction = 90;
16
        }
17
        target.speed = speed;
18
        target.direction = direction;
19
    }
20
    timer += 1;
21
    if (timer >= time)
22
    {
23
        target.speed = 0;
24
        target.image_index = 0;
25
        target.image_speed = 0;
26
        instance_destroy();
27
        exit;
28
    }
29
}
30
else
31
{
32
    instance_destroy();
33
    exit;
34
}