Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_knight_split_growtangle_vertical_Other_11

(view raw script w/o annotations or w/e)
1
if (obj_growtangle.customBox)
2
    exit;
3
var _newyscale = 3.3333333333333335;
4
with (obj_growtangle)
5
{
6
    customBox = true;
7
    image_yscale = _newyscale;
8
    var _boxhalf = 37;
9
    maxyscale = _newyscale;
10
    var _tempxscale = maxxscale / 2;
11
    var _tempyscale = maxyscale / 2;
12
    var _halfsplit = 50;
13
    var surf = surface_create(75 * _tempxscale, 75 * _tempyscale);
14
    var _halfwidth = 75 * _tempxscale;
15
    var _halfheight = 75 * _tempyscale;
16
    surface_set_target(surf);
17
    draw_clear_alpha(c_black, 0);
18
    draw_sprite_part_ext_rot(2819, 0, 0, 0, _halfwidth, _boxhalf, floor(_halfwidth / 2), floor(_halfheight / 2) - (_halfsplit / 2), 1, 1, 0, 16777215, 1);
19
    draw_sprite_part_ext_rot(2819, 0, 0, 0, _halfwidth, _boxhalf, floor(_halfwidth / 2), floor(_halfheight / 2) + (_halfsplit / 2), 1, 1, 180, 16777215, 1);
20
    draw_set_color(c_white);
21
    ossafe_fill_rectangle(0, floor(_halfheight / 2) - (_halfsplit / 2), _halfwidth, floor(_halfheight / 2) - (_halfsplit / 2));
22
    ossafe_fill_rectangle(0, floor(_halfheight / 2) + (_halfsplit / 2), _halfwidth, floor(_halfheight / 2) + (_halfsplit / 2));
23
    spr_custom_box = sprite_create_from_surface(surf, 0, 0, _halfwidth, _halfheight, false, false, round(_halfwidth / 2), round(_halfheight / 2));
24
    surface_reset_target();
25
    surface_free(surf);
26
}