Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_lw_rain_effect_Step_2

(view raw script w/o annotations or w/e)
1
if (active && rainsplash)
2
{
3
    with (obj_mainchara)
4
    {
5
        if (!visible)
6
            continue;
7
        if (fun == 0)
8
        {
9
            if (image_index == 1 && other.stepped == 0)
10
            {
11
                if (!collision_point(x + 10, y + 38, obj_lw_rain_dryzone, false, true))
12
                    snd_play(snd_stepsplash1, 0.5);
13
                other.stepped = 1;
14
            }
15
            else if (image_index == 0 || image_index == 2)
16
            {
17
                other.stepped = 0;
18
            }
19
            else if (image_index == 3 && other.stepped == 0)
20
            {
21
                if (!collision_point(x + 10, y + 38, obj_lw_rain_dryzone, false, true))
22
                    snd_play(snd_stepsplash2, 0.5);
23
                other.stepped = 1;
24
            }
25
        }
26
    }
27
    with (obj_actor)
28
    {
29
        if (!visible)
30
            continue;
31
        if (name == "kris")
32
        {
33
            if (image_index == 1 && other.stepped == 0)
34
            {
35
                if (!collision_point(x + 10, y + 38, obj_lw_rain_dryzone, false, true))
36
                    snd_play(snd_stepsplash1, 0.5);
37
                other.stepped = 1;
38
            }
39
            else if (image_index == 0 || image_index == 2)
40
            {
41
                other.stepped = 0;
42
            }
43
            else if (image_index == 3 && other.stepped == 0)
44
            {
45
                if (!collision_point(x + 10, y + 38, obj_lw_rain_dryzone, false, true))
46
                    snd_play(snd_stepsplash2, 0.5);
47
                other.stepped = 1;
48
            }
49
        }
50
    }
51
}