Undertale script viewer

← back to main script listing

gml_Object_obj_vsflowey_heart_Step_0

(view raw script w/o annotations or w/e)
1
if (move == 1)
2
{
3
    if (obj_time.left)
4
    {
5
        if (x > 0)
6
        {
7
            if (obj_flowey_master.darkmode != 0 || x > 108)
8
                x -= 4;
9
        }
10
    }
11
    if (obj_time.right)
12
    {
13
        if (x < (room_width - sprite_width))
14
        {
15
            if (obj_flowey_master.darkmode != 0 || x < 512)
16
                x += 4;
17
        }
18
    }
19
    if (obj_time.up)
20
    {
21
        if (y > 0)
22
        {
23
            if (obj_flowey_master.darkmode != 0 || y > 268)
24
                y -= 4;
25
        }
26
    }
27
    if (obj_time.down)
28
    {
29
        if (y < (room_height - sprite_height))
30
            y += 4;
31
    }
32
}
33
global.my_inv -= 1;
34
if (global.my_inv > 0)
35
{
36
    image_speed = 0.5;
37
}
38
else
39
{
40
    image_index = 0;
41
    image_speed = 0;
42
}
43
if (global.my_hp <= 0 && special == 0)
44
    instance_create(x, y, obj_vsflowey_heartdefeated);