Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_masterPlatformController_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 1)
2
{
3
    noelle = instance_create(obj_controller_city_mice3.noelle.x + 4, obj_controller_city_mice3.noelle.y, obj_noelle_scared);
4
    with (noelle)
5
    {
6
        hastarget = 1;
7
        jumppuzzle = 1;
8
        if (instance_exists(obj_masterPlatformController))
9
            target = obj_masterPlatformController.plat[0];
10
    }
11
    with (obj_controller_city_mice3)
12
    {
13
        with (noelle)
14
            instance_destroy();
15
    }
16
    active = 1;
17
    init = 2;
18
}
19
if (active == 1)
20
{
21
    waitbuffer--;
22
    if (obj_controller_city_mice3.micescore >= 1)
23
        hasbegun = 1;
24
    if (makenewplatform == 1 && waitbuffer <= 0 && freeze == 0)
25
    {
26
        with (obj_rotationtile_tower)
27
            phase++;
28
        currentPlatform++;
29
        plat[currentPlatform] = instance_create(x, y, obj_rotationtile_tower);
30
        with (plat[currentPlatform])
31
        {
32
            x = 640;
33
            y = 480;
34
        }
35
        makenewplatform = 0;
36
        waitbuffer = 30;
37
    }
38
    if (mouseSpawn == true && plat[currentPlatform - 1].tilecon == 0)
39
    {
40
        with (plat[currentPlatform - 1])
41
        {
42
            hole.mousecreate = 1;
43
            hole.gentimer = 20;
44
        }
45
        freezespawn = 60;
46
        mouseSpawn = false;
47
    }
48
    freezespawn--;
49
    if (freezespawn == 0)
50
        global.interact = 0;
51
}