Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_spinheart_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 4)
2
{
3
    htimer += 1;
4
    if (htimer >= 10)
5
    {
6
        friction = 0;
7
        speed = 0;
8
    }
9
    if (htimer >= 20)
10
    {
11
        active = 0;
12
        image_alpha -= 0.2;
13
    }
14
    if (htimer >= 25)
15
    {
16
        if (global.turntimer >= 0)
17
            global.turntimer = -2;
18
    }
19
}
20
if (con == 3)
21
{
22
    htimer += 1;
23
    if (htimer >= hmax)
24
    {
25
        direction = image_angle;
26
        speed = 2.5;
27
        friction = -0.5;
28
        if (joker == 1)
29
            speed = 5;
30
        con = 4;
31
        htimer = 0;
32
    }
33
}
34
if (con == 2)
35
{
36
    htimer += 1;
37
    image_angle += 24;
38
    if (htimer >= spinmax)
39
    {
40
        hmax = 19;
41
        if (joker == 1)
42
            hmax = 15;
43
        image_angle = 270 + (spinmax * 24);
44
        con = 3;
45
        htimer = 0;
46
    }
47
}
48
if (con == 1)
49
{
50
    htimer += 1;
51
    if (htimer >= 10)
52
    {
53
        spinmax = choose(26.25, 30, 33.75, 37.5);
54
        if (joker == 1)
55
            spinmax = 15 + random(15);
56
        con = 2;
57
        htimer = 0;
58
    }
59
}
60
if (con == 0)
61
{
62
    image_alpha += 0.2;
63
    image_xscale -= 0.2;
64
    image_yscale -= 0.2;
65
    htimer += 1;
66
    if (htimer >= 5)
67
    {
68
        con = 1;
69
        htimer = 0;
70
        active = 1;
71
    }
72
}
73
if (grazed == 1)
74
    grazetimer += 1;
75
if (grazetimer >= 15)
76
{
77
    grazetimer = 0;
78
    grazed = 0;
79
}