Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_make_fixed_size

(view raw script w/o annotations or w/e)
1
function 
scr_make_fixed_size
scr_make_fixed_size

function
scr_make_fixed_size(arg0 = -1, arg1 = -1)
{ if (arg0 != -1) image_xscale = arg0 / sprite_get_width(sprite_index); if (arg1 != -1) image_yscale = arg1 / sprite_get_height(sprite_index); }
(arg0 = -1, arg1 = -1)
2
{
3
    if (arg0 != -1)
4
        image_xscale = arg0 / sprite_get_width(sprite_index);
5
    if (arg1 != -1)
6
        image_yscale = arg1 / sprite_get_height(sprite_index);
7
}