Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_starwalker_offswitch_Other_10

(view raw script w/o annotations or w/e)
1
if (global.interact == 0)
2
{
3
    if (instance_exists(obj_starwalker_overworld))
4
    {
5
        bellcon = 1;
6
        myinteract = 0;
7
        image_speed = 0.25;
8
        with (obj_overworldbulletparent)
9
        {
10
            active = 0;
11
            instance_destroy();
12
        }
13
        snd_play(snd_bell);
14
        if (obj_starwalker_overworld.beatcon == 0)
15
        {
16
            if (room == room_forest_starwalker && !instance_exists(obj_npc_room))
17
            {
18
                originalstarwalker = instance_create(2200, 200, obj_npc_room);
19
                if (x >= (room_width / 2))
20
                {
21
                    with (originalstarwalker)
22
                        x = 400;
23
                }
24
            }
25
            with (obj_starwalker_overworld)
26
            {
27
                visible = 0;
28
                beatcon = 1;
29
                beattimer = 0;
30
                with (obj_mainchara)
31
                    battlemode = 0;
32
                dead = instance_create(x - 92, y - 74, obj_starwalker_battle);
33
                with (dead)
34
                {
35
                    walkcon = 1;
36
                    walktimer = 0;
37
                }
38
                with (shadow)
39
                    instance_destroy();
40
            }
41
        }
42
    }
43
}