Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_forest_area5_puzzle_Collision_obj_mainchara

(view raw script w/o annotations or w/e)
1
qualify = 0;
2
if (type == 0)
3
{
4
    if (obj_mainchara.y >= (y + 200) && last_touched != 1)
5
    {
6
        qualify = 1;
7
        last_touched = 1;
8
    }
9
    if (obj_mainchara.y <= (y + 200) && last_touched != 0)
10
    {
11
        qualify = 1;
12
        last_touched = 0;
13
    }
14
}
15
if (type == 1 && last_touched != -1)
16
{
17
    if (obj_mainchara.x >= (x + 200) && last_touched != 3)
18
    {
19
        qualify = 1;
20
        last_touched = 3;
21
    }
22
    if (obj_mainchara.x <= (x + 200) && last_touched != 2)
23
    {
24
        qualify = 1;
25
        last_touched = 2;
26
    }
27
}
28
if (qualify == 1)
29
{
30
    with (object_index)
31
    {
32
        if (last_touched == -1)
33
            last_touched = 4;
34
    }
35
    if (obj_darkponman_ow.max_battlealpha < 1.9)
36
    {
37
        snd_play(snd_wing);
38
        with (obj_darkponman_ow)
39
        {
40
            max_battlealpha += 0.12;
41
            if (max_battlealpha > 1.9)
42
                max_battlealpha = 1.9;
43
        }
44
    }
45
}