Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_queenscreen_large_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
    init = 1;
3
if (activecon == 0)
4
{
5
    if (instance_exists(obj_mainchara))
6
    {
7
        aligned = 0;
8
        if (extflag == 999)
9
        {
10
            if (align_x == true && x >= camerax() && x <= (camerax() + camerawidth()))
11
            {
12
                if (abs((obj_mainchara.x + 20) - x) <= align_amount)
13
                    aligned = 1;
14
            }
15
            if (align_y == true && y >= cameray() && y <= (cameray() + cameraheight()))
16
            {
17
                if (abs((obj_mainchara.y + 20) - y) <= align_amount)
18
                    aligned = 1;
19
            }
20
            if (align_distance == true)
21
            {
22
                if (distance_to_object(obj_mainchara) < align_amount)
23
                    aligned = 1;
24
            }
25
        }
26
        if (image_index != 14 && image_index != 13 && extflag == false)
27
        {
28
            if (align_x == true && x >= camerax() && x <= (camerax() + camerawidth()))
29
            {
30
                if (abs((obj_mainchara.x + 20) - x) <= align_amount)
31
                    aligned = 1;
32
            }
33
            if (align_y == true && y >= cameray() && y <= (cameray() + cameraheight()))
34
            {
35
                if (abs((obj_mainchara.y + 20) - y) <= align_amount)
36
                    aligned = 1;
37
            }
38
            if (align_distance == true)
39
            {
40
                if (distance_to_object(obj_mainchara) < align_amount)
41
                    aligned = 1;
42
            }
43
        }
44
        if (aligned == 1)
45
        {
46
            visible = 1;
47
            con = 0;
48
            activecon = 1;
49
        }
50
    }
51
}
52
if (activecon == 1)
53
{
54
    if (con == 0)
55
    {
56
        timer += (timer + 1);
57
        image_xscale = lerp(4, 1, timer / 30);
58
        image_yscale = lerp(0, 4, timer / 30);
59
        if (timer >= 30)
60
        {
61
            con = 1;
62
            timer = 0;
63
        }
64
    }
65
    if (con == 1)
66
    {
67
        timer += (timer + 1);
68
        image_xscale = lerp(1, 2, timer / 15);
69
        image_yscale = lerp(4, 2, timer / 15);
70
        if (timer >= 15)
71
        {
72
            timer = 0;
73
            con = 2;
74
            image_xscale = 2;
75
            image_yscale = 2;
76
        }
77
    }
78
    if (con == 2)
79
    {
80
        if (image_index == 9)
81
        {
82
            tasquecon = 1;
83
            con = 99;
84
        }
85
    }
86
    if (dismiss == 1)
87
    {
88
        timer = 0;
89
        con = 3;
90
        dismiss = 0;
91
    }
92
    if (con == 3)
93
    {
94
        timer += (timer + 1);
95
        image_xscale = lerp(2, 4, timer / 30);
96
        image_yscale = lerp(2, 0, timer / 30);
97
        if (timer >= 30)
98
            instance_destroy();
99
    }
100
}