Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_controller_Draw_64

(view raw script w/o annotations or w/e)
1
draw_sprite_ext(spr_susiezilla_ui, 0, 0, (cameray() + cameraheight()) - 132, 2, 2, 0, c_white, 1);
2
obj_susiezilla.health_count_prev_timer -= 1;
3
if (obj_susiezilla.health_count_prev_timer < 1 && obj_susiezilla.health_count_prev > obj_susiezilla.health_count)
4
{
5
    obj_susiezilla.health_count_prev -= 8;
6
    if (obj_susiezilla.health_count_prev < obj_susiezilla.health_count)
7
        obj_susiezilla.health_count_prev = obj_susiezilla.health_count;
8
}
9
draw_healthbar(444, ((cameray() + cameraheight()) - 130) + 16, 608, ((cameray() + cameraheight()) - 130) + 32, obj_susiezilla.health_count_prev / 10, c_gray, c_red, c_red, 255, true, false);
10
draw_healthbar(444, ((cameray() + cameraheight()) - 130) + 16, 608, ((cameray() + cameraheight()) - 130) + 32, obj_susiezilla.health_count / 10, c_gray, c_lime, c_lime, 65280, false, false);
11
scr_84_set_draw_font
scr_84_set_draw_font

function
scr_84_set_draw_font(arg0)
{ global.chemg_font = arg0; draw_set_font(
scr_84_get_font(arg0));
}
("main");
12
draw_set_halign(fa_right);
13
draw_text_ext_transformed(610, ((cameray() + cameraheight()) - 130) + 80, string(obj_susiezilla.susiezilla_score), 300, 300, 2, 2, 0);
14
draw_set_halign(fa_left);
15
var susie_icon_index = 0;
16
if (obj_susiezilla.hurtcon > 0)
17
    susie_icon_index = 1;
18
draw_sprite(spr_susiezilla_icon, susie_icon_index, 418 + ((obj_susiezilla.x / 1920) * 200), 416);
19
if (camerax_target != camerax() && move_camera_con == 1)
20
{
21
    siner++;
22
    _index += 0.066;
23
    if (waittoolongtimer >= 900)
24
    {
25
        siner += 3;
26
        _index += 0.066;
27
        draw_sprite(spr_susiezilla_moveit_angry, _index, (camerawidth() - 100) + (sin(siner / 3) * 3), cameray() + 100);
28
    }
29
    else
30
    {
31
        draw_sprite(spr_susiezilla_moveit, _index, (camerawidth() - 100) + (sin(siner / 3) * 3), cameray() + 100);
32
    }
33
    if (_index > 2)
34
    {
35
        _index = 0;
36
        snd_play(snd_scissorbell);
37
    }
38
    waittoolongtimer++;
39
    if (waittoolongtimer >= 900)
40
    {
41
        var swordzombie = false;
42
        for (var i = 0; i < instance_number(obj_susiezilla_zombie); i++)
43
        {
44
            zombie[i] = instance_find(obj_susiezilla_zombie, i);
45
            if (zombie[i].sprite_index == spr_susiezilla_zombie_giantsword)
46
                swordzombie = true;
47
        }
48
        if (swordzombie == false)
49
        {
50
            zombo = instance_create(camerax() - 25, 259, obj_susiezilla_zombie);
51
            zombo.sprite_index = spr_susiezilla_zombie_giantsword;
52
        }
53
    }
54
}
55
else
56
{
57
    waittoolongtimer = 0;
58
}
59
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && show_hitboxes)
60
{
61
    draw_set_color(c_blue);
62
    with (obj_susiezilla_object)
63
    {
64
        if (object_index == obj_susiezilla)
65
            continue;
66
        draw_set_alpha(0.25);
67
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, false);
68
        draw_set_alpha(1);
69
        if (height != 0)
70
            ossafe_fill_rectangle(x, y - height, x + 1, y, false);
71
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, true);
72
    }
73
    draw_set_color(c_purple);
74
    with (obj_susiezilla)
75
    {
76
        draw_set_alpha(0.25);
77
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, false);
78
        draw_set_alpha(1);
79
        if (height != 0)
80
            ossafe_fill_rectangle(x, y - height, x + 1, y, false);
81
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, true);
82
    }
83
    draw_set_color(c_yellow);
84
    with (obj_susiezilla_collectible)
85
    {
86
        draw_set_alpha(0.25);
87
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, false);
88
        draw_set_alpha(1);
89
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, true);
90
    }
91
    draw_set_color(c_red);
92
    with (obj_susiezilla_enemy_hitbox)
93
    {
94
        draw_set_alpha(0.25);
95
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, false);
96
        draw_set_alpha(1);
97
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, true);
98
    }
99
    with (obj_susiezilla_player_hitbox)
100
    {
101
        draw_set_alpha(0.25);
102
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, false);
103
        draw_set_alpha(1);
104
        ossafe_fill_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, true);
105
    }
106
}