Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_box_hit_controller_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer == 16 && countmax == count)
3
{
4
    with (obj_hammer_of_justice_enemy)
5
        visible = false;
6
    instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport);
7
}
8
if (timer == 25)
9
{
10
    count--;
11
    if (count == -1)
12
    {
13
        global.turntimer = 12;
14
        exit;
15
    }
16
    if (con == 0)
17
    {
18
        leftgerson = instance_create(obj_growtangle.x - 180, obj_growtangle.y + 20, obj_gerson_teleport);
19
        leftgerson.type = 1;
20
    }
21
    else
22
    {
23
        rightgerson = instance_create(obj_growtangle.x + 180, obj_growtangle.y + 20, obj_gerson_teleport);
24
        rightgerson.type = 1;
25
        rightgerson.image_xscale = -2;
26
    }
27
    if (con == 0)
28
        con = 1;
29
    else
30
        con = 0;
31
    if (irandom(100) < 50)
32
        con = choose(0, 1);
33
    timer = 0;
34
}
35
if (timer == 36)
36
{
37
    gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport);
38
    gers.type = 10;
39
    instance_destroy();
40
}