Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_slowdown_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    timer++;
4
    if (obj_hammer_of_justice_enemy.rudebusterhitcountmax == 1)
5
    {
6
        if (timer >= 5)
7
            speed = 20;
8
        if (timer >= 8 && timer <= 10)
9
        {
10
            obj_gerson_rudebuster.speed = lerp(20, 0.5, (timer - 8) / 2);
11
            obj_gerson_rudebuster.gravity = 0;
12
            obj_gerson_rudebuster.friction = 0;
13
        }
14
    }
15
    if (obj_hammer_of_justice_enemy.rudebusterhitcountmax == 2)
16
    {
17
        if (obj_hammer_of_justice_enemy.rudebusterhitcount == 1)
18
            obj_gerson_rudebuster.speed = 20;
19
        if (obj_hammer_of_justice_enemy.rudebusterhitcount == 2)
20
            obj_gerson_rudebuster.speed = 35;
21
    }
22
    if (obj_hammer_of_justice_enemy.rudebusterhitcountmax == 3)
23
    {
24
        if (obj_hammer_of_justice_enemy.rudebusterhitcount == 1)
25
            obj_gerson_rudebuster.speed = 20;
26
        if (obj_hammer_of_justice_enemy.rudebusterhitcount == 2)
27
            obj_gerson_rudebuster.speed = 35;
28
        if (obj_hammer_of_justice_enemy.rudebusterhitcount == 3)
29
            obj_gerson_rudebuster.speed = 50;
30
    }
31
    darkalpha = lerp(darkalpha, 1, timer / 60);
32
}
33
if (con == 1)
34
{
35
    timer++;
36
    darkalpha = lerp(darkalpha, 0.5, 0.2);
37
    if (timer == 10)
38
        instance_destroy();
39
}