Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_queen_kristhrown_Step_0

(view raw script w/o annotations or w/e)
1
if ((con == 0 && bonk == 0) || (con == 2 && bonk == 0))
2
    image_angle = direction;
3
if (x > (xx + 700) || y < (yy - 40))
4
{
5
    if (con == 0)
6
    {
7
        gravity = 0;
8
        speed = 0;
9
        x = xx - 40;
10
        y = obj_herokris.y;
11
        sprite_index = spr_krisb_idle;
12
        image_angle = 0;
13
        hspeed = 20;
14
        con = 10;
15
    }
16
}
17
if (con == 10)
18
{
19
    timer += 1;
20
    if (x >= (obj_herokris.x - 10))
21
    {
22
        if (collided == 0)
23
        {
24
            global.msg[0] = stringsetloc(
* Missed!Wait for inputClose Message
"* Missed!/%", "obj_queen_kristhrown_slash_Step_0_gml_24_0"
);
25
            scr_battletext_default
scr_battletext_default

function scr_battletext_default() { global.fc = 0; global.typer = 4; scr_battletext(); return battlewriter; }
();
26
        }
27
        with (obj_herokris)
28
            visible = 1;
29
        if (obj_queen_throwkris.throwXcon == 0)
30
        {
31
            with (obj_herosusie)
32
                visible = 1;
33
            visible = 0;
34
            with (obj_queen_throwkris)
35
                instance_destroy();
36
            with (obj_queen_throwtarget)
37
                instance_destroy();
38
            con = 11;
39
        }
40
        else
41
        {
42
            instance_destroy();
43
        }
44
    }
45
}
46
if (con == 11 && !instance_exists(obj_writer))
47
{
48
    obj_queen_enemy.actcon = 35;
49
    instance_destroy();
50
}
51
if (con == 2)
52
{
53
    if (x < (xx - 40) || y > (cameray() + 380))
54
    {
55
        timer = 0;
56
        gravity = 0;
57
        speed = 0;
58
        x = xx - 40;
59
        y = obj_herokris.y;
60
        sprite_index = spr_krisb_idle;
61
        image_angle = 0;
62
        image_xscale = 2;
63
        hspeed = 20;
64
        con = 10;
65
    }
66
}
67
if (instance_exists(obj_queenshield_enemy) && x > (obj_queenshield_enemy.x - 60) && bonk == 0)
68
{
69
    block_star = instance_create(x + 60, y + 14, obj_boxing_block_star);
70
    block_star.direction = 0 + random(90);
71
    block_star = instance_create(x + 60, y + 14, obj_boxing_block_star);
72
    block_star.direction = 90 + random(90);
73
    block_star = instance_create(x + 60, y + 14, obj_boxing_block_star);
74
    block_star.direction = 180 + random(90);
75
    block_star = instance_create(x + 60, y + 14, obj_boxing_block_star);
76
    block_star.direction = 270 + random(90);
77
    with (obj_boxing_block_star)
78
        depth = obj_queenshield_enemy.depth - 1;
79
    obj_queen_enemy.shieldhp -= 20;
80
    with (obj_queenshield_enemy)
81
        con = 1;
82
    with (obj_queenshield_enemy)
83
        event_user(0);
84
    bonk = 1;
85
    con = 2;
86
    snd_play(snd_bell);
87
    speed *= -0.2;
88
    x += 15;
89
    obj_queenshield_enemy.shaketimer = 4;
90
}
91
if (y > (cameray() + 240))
92
    depth = obj_herokris.depth + 1000;