Deltarune (Chapter 2) script viewer

← back to main script listing

gml_GlobalScript_scr_heartcolor

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

function
scr_heartcolor(arg0)
{ __heartcolor = arg0; if (__heartcolor == "red" || __heartcolor == 0) { with (obj_heart) { color = 0; sprite_index = spr_heart; } } if (__heartcolor == "yellow" || __heartcolor == 1) { with (obj_heart) { color = 1; sprite_index = spr_yellowheart; } obj_grazebox.sprite_index = spr_grazeappear_yellow; } }
(arg0)
2
{
3
    __heartcolor = arg0;
4
    if (__heartcolor == "red" || __heartcolor == 0)
5
    {
6
        with (obj_heart)
7
        {
8
            color = 0;
9
            sprite_index = spr_heart;
10
        }
11
    }
12
    if (__heartcolor == "yellow" || __heartcolor == 1)
13
    {
14
        with (obj_heart)
15
        {
16
            color = 1;
17
            sprite_index = spr_yellowheart;
18
        }
19
        obj_grazebox.sprite_index = spr_grazeappear_yellow;
20
    }
21
}