Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_house_timer_Draw_0

(view raw script w/o annotations or w/e)
1
var housecount = 0;
2
for (var i = 0; i < instance_number(obj_susiezilla_house_single); i++)
3
{
4
    house[i] = instance_find(obj_susiezilla_house_single, i);
5
    if (house[i].myhealth > 0)
6
        housecount++;
7
}
8
if (!i_ex(obj_susiezilla_gamecontroller))
9
{
10
    instance_destroy();
11
    exit;
12
}
13
if (con == 1)
14
{
15
    image_alpha -= 0.1;
16
    if (housecount > 0 && image_alpha == -0.3)
17
        obj_tenna_enemy.minigamefailcount++;
18
    if (failcount > 1 && image_alpha == -0.6)
19
        obj_tenna_enemy.minigamefailcount++;
20
    if (failcount > 2 && image_alpha == -0.9)
21
        obj_tenna_enemy.minigamefailcount++;
22
    if (image_alpha == -0.3)
23
    {
24
        with (obj_susiezilla_house_single)
25
        {
26
            dontsayperfect = true;
27
            if (myhealth > 0)
28
            {
29
                anim = instance_create(x + 20, y, obj_animation);
30
                anim.sprite_index = spr_tenna_x;
31
                anim.image_speed = 0;
32
                anim.image_index = 1;
33
                anim.speed = 8;
34
                anim.direction = 90;
35
                anim.friction = 1;
36
                with (anim)
37
                {
38
                    
scr_afterimage_grow
scr_afterimage_grow

function
scr_afterimage_grow()
{ afterimage = instance_create(x, y, obj_afterimage_grow); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
39
                    afterimage.speed = speed;
40
                    afterimage.direction = direction;
41
                    afterimage.friction = friction;
42
                }
43
                other.failcount++;
44
                
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
45
            }
46
            myhealth = 0;
47
        }
48
    }
49
}
50
var houseexists = false;
51
for (var i = 0; i < instance_number(obj_susiezilla_house_single); i++)
52
{
53
    house[i] = instance_find(obj_susiezilla_house_single, i);
54
    if (house[i].myhealth > 0)
55
        houseexists = true;
56
}
57
if (timer < 60)
58
{
59
    timer += (1/3);
60
    clocktimer++;
61
}
62
else
63
{
64
    obj_susiezilla_gamecontroller.time_counter = 30;
65
}