Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_o_coaster_controller_Create_0

(view raw script w/o annotations or w/e)
1
timer = 0;
2
timermax = 180;
3
playerinput = 0;
4
playerinputtimer = 0;
5
actcon = 0;
6
krisgooffscreen = 0;
7
susiegooffscreen = 0;
8
ralseigooffscreen = 0;
9
buttonspressed = 0;
10
bumpmercy = 0;
11
endcoaster = 0;
12
endcoastertimer = 0;
13
mykey[0] = 90;
14
mykey[1] = 88;
15
mykey[2] = 67;
16
BerdlyCoaster = instance_create(camerax() + 470, cameray() + 203, o_coaster_berdly);
17
if (instance_exists(obj_ch2_scene11a))
18
    o_coaster_berdly.x = obj_ch2_scene11a.coaster_berdly.x + 16;
19
for (i = 0; i < 3; i += 1)
20
{
21
    HeroCoaster[i] = instance_create((camerax() + 100) - (i * 20), cameray() + 149 + (60 * i), o_coaster_hero);
22
    HeroCoaster[i].HeroID = i;
23
    HeroCoaster[i].image_index = i;
24
    HeroCoaster[i].depth = HeroCoaster[i].y * -100;
25
    HeroCoaster[i].siner = 0;
26
    HeroCoaster[i].mykey = mykey[i];
27
    with (HeroCoaster[i])
28
    {
29
        back = instance_create(x, y, o_coaster_hero_back);
30
        back.image_index = HeroID;
31
        back.parentid = id;
32
    }
33
    yspot[i] = HeroCoaster[i].y;
34
    BerdlyCoaster.yspot[i] = HeroCoaster[i].y;
35
    obj_herokris.x = camerax() - 200;
36
    if (instance_exists(obj_herosusie))
37
        obj_herosusie.x = camerax() - 200;
38
    if (instance_exists(obj_heroralsei))
39
        obj_heroralsei.x = camerax() - 200;
40
    if (HeroCoaster[i].HeroID == 0)
41
        HeroCoaster[i].sprite_index = spr_krisb_idle;
42
    if (HeroCoaster[i].HeroID == 1)
43
        HeroCoaster[i].sprite_index = spr_susieb_idle;
44
    if (HeroCoaster[i].HeroID == 2)
45
        HeroCoaster[i].sprite_index = spr_ralsei_idle;
46
    if (instance_exists(obj_ch2_scene11a))
47
    {
48
        if (i == 0)
49
        {
50
            HeroCoaster[i].x = obj_ch2_scene11a.coaster_kris.x - 22;
51
            HeroCoaster[i].sprite_index = spr_krisb_attack;
52
        }
53
        if (i == 1)
54
        {
55
            HeroCoaster[i].x = obj_ch2_scene11a.coaster_susie.x - 22;
56
            HeroCoaster[i].sprite_index = spr_susie_attack;
57
        }
58
        if (i == 2)
59
        {
60
            HeroCoaster[i].x = obj_ch2_scene11a.coaster_ralsei.x - 22;
61
            HeroCoaster[i].sprite_index = spr_ralsei_battleintro;
62
        }
63
    }
64
}
65
jamatime = 90;
66
jamatimer = 0;
67
littime = 120;
68
littimer = 0;