Undertale script viewer

← back to main script listing

gml_Object_obj_6bparent_Collision_1587

(view raw script w/o annotations or w/e)
1
if (global.my_inv < 0)
2
{
3
    global.my_inv = 20;
4
    hitted = 0;
5
    snd_play(snd_hurt1_c);
6
    instance_create(0, 0, obj_vsflowey_shaker);
7
    if (global.my_hp > 40 && hitted == 0)
8
    {
9
        global.my_hp -= 6;
10
        hitted = 1;
11
    }
12
    if (global.my_hp > 30 && hitted == 0)
13
    {
14
        global.my_hp -= 4;
15
        hitted = 1;
16
    }
17
    if (global.my_hp > 20 && hitted == 0)
18
    {
19
        global.my_hp -= 3;
20
        hitted = 1;
21
    }
22
    if (global.my_hp > 12 && hitted == 0)
23
    {
24
        global.my_hp -= 2;
25
        hitted = 1;
26
    }
27
    if (global.my_hp > 5 && hitted == 0)
28
    {
29
        global.my_hp -= 1;
30
        hitted = 1;
31
    }
32
    if (global.my_hp > 0 && hitted == 0)
33
    {
34
        global.my_hp -= 1;
35
        hitted = 1;
36
    }
37
    if (global.my_hp <= 1)
38
        global.my_hp = 1;
39
}