Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_yellow_miniboss_Draw_72

related scripts: Collision_obj_plat_enm_smallgloveCollision_obj_plat_playerCollision_obj_plat_susieaxe_hbxCreate_0Destroy_0Draw_0Draw_72 Other_19Other_4PreCreate_0Step_0Step_2

(view raw script w/o annotations or w/e)
1
if (con == 7 || (con == 8 && i_ex(obj_panner)))
2
{
3
    var lpsi = last_psi;
4
    with (obj_plat_camera)
5
    {
6
        with (obj_genmarker)
7
        {
8
            if (extflag == "camera1" && lpsi != 2)
9
                other.max_x = x;
10
            if (extflag == "camera2")
11
                other.min_x = x;
12
            if (extflag == "camera3" && lpsi == 2)
13
                other.max_x = x;
14
        }
15
        with (obj_plat_barrier)
16
        {
17
            if (lpsi == 0)
18
                rightlerp = clamp(inverselerp(0, -80, other.x - other.max_x), 0, 1);
19
            if (lpsi == 1)
20
                leftlerp = clamp(inverselerp(0, 80, other.x - other.min_x), 0, 1);
21
            if (lpsi == 2)
22
                rightlerp = clamp(inverselerp(0, -80, other.x - other.max_x), 0, 1);
23
        }
24
    }
25
}
26
else if (con == 8)
27
{
28
    var lpsi = last_psi;
29
    with (obj_plat_camera)
30
    {
31
        with (obj_genmarker)
32
        {
33
            if (extflag == "camera1" && lpsi != 2)
34
                other.max_x = x;
35
            if (extflag == "camera2")
36
                other.min_x = x;
37
            if (extflag == "camera3" && lpsi == 2)
38
                other.max_x = x;
39
        }
40
        with (obj_plat_barrier)
41
        {
42
            leftlerp = inverselerp(0, 80, other.x - other.min_x);
43
            rightlerp = inverselerp(0, -80, other.x - other.max_x);
44
        }
45
    }
46
}