Deltarune script viewer

← back to main script listing

gml_Object_obj_spamton_dollar_Draw_0

(view raw script w/o annotations or w/e)
1
if (image_alpha < 1 && obj_spamton_attack_mode.state <= 2)
2
{
3
    image_alpha += 0.1;
4
}
5
else if (obj_spamton_attack_mode.state > 2)
6
{
7
    image_alpha -= 0.1;
8
    active = false;
9
    if (image_alpha <= 0)
10
        instance_destroy();
11
}
12
var maxx = obj_spamton_attack_mode.x + obj_spamton_attack_mode.mouthx;
13
if (obj_spamton_attack_mode.state == 2)
14
{
15
    scr_drawpart_crop
scr_drawpart_crop

function scr_drawpart_crop(arg0, arg1, arg2, arg3) { var _true_xanchor = x - abs(sprite_xoffset); var _true_yanchor = y - abs(sprite_yoffset); if (_true_xanchor > arg0 && (_true_xanchor + sprite_width) < arg2 && _true_yanchor > arg1 && (_true_yanchor + sprite_height) < arg3) { draw_self(); exit; } var _leftcrop = clamp(arg0 - _true_xanchor, 0, abs(sprite_width)); var _topcrop = clamp(arg1 - _true_yanchor, 0, abs(sprite_height)); var _rightcrop = clamp(arg2 - _true_xanchor, 0, abs(sprite_width)); var _bottomcrop = clamp(arg3 - _true_yanchor, 0, abs(sprite_height)); draw_sprite_part_ext(sprite_index, image_index, _leftcrop, _topcrop, _rightcrop, _bottomcrop, (x - sprite_xoffset) + _leftcrop, (y - sprite_yoffset) + _topcrop, image_xscale, image_yscale, image_blend, image_alpha); }
(0, 0, maxx, 800);
16
    if ((x - sprite_xoffset) > maxx)
17
        instance_destroy();
18
}
19
else
20
{
21
    draw_self();
22
}