Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_bug_treasure_chest_Other_10

(view raw script w/o annotations or w/e)
1
with (obj_darkcontroller)
2
    charcon = 0;
3
global.msc = 0;
4
global.typer = 5;
5
if (global.darkzone == 1)
6
    global.typer = 6;
7
global.fc = 0;
8
global.fe = 0;
9
global.interact = 1;
10
if (image_index == 0)
11
{
12
    snd_play(snd_locker);
13
    if (room != room_dw_city_postbaseball_1)
14
    {
15
        for (var i = 0; i < 5; i++)
16
        {
17
            bug[i] = instance_create(x + 20, y + 20, obj_tinybug);
18
            bug[i].direction = random(180);
19
            bug[i].speed = random(2) + 4;
20
            bug[i].sprite_index = spr_tinybug;
21
            bug[i].depth = depth - 1;
22
        }
23
    }
24
    else
25
    {
26
        for (var i = 0; i < 10; i++)
27
        {
28
            bug[i] = instance_create(x, y, obj_cybercity_balloon);
29
            bug[i].vspeed = -2 + random(1);
30
            bug[i].hspeed = random_range(-3, 3);
31
            bug[i].friction = 0.1;
32
            bug[i].gravity = -0.12;
33
            bug[i].mode = 1;
34
            bug[i].depth = 5000;
35
            bug[i].sprite_index = spr_bg_city_balloon_white;
36
            bug[i].image_blend = make_color_hsv(floor(random(255)), 190, 255);
37
            bug[i].blend = c_black;
38
            bug[i].image_xscale = 1;
39
            bug[i].image_yscale = 1;
40
        }
41
        with (obj_room_dw_city_postbaseball)
42
            rodeteacup = 5;
43
    }
44
}
45
image_index = 1;
46
myinteract = 1;
47
global.interact = 0;