Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mizzle_spotlight_controller_b_Step_0

(view raw script w/o annotations or w/e)
1
if (instance_number(obj_bulletparent) < 1)
2
    global.turntimer = 0;
3
if (global.turntimer < 1)
4
{
5
    instance_destroy();
6
    exit;
7
}
8
timer++;
9
if (eye_power == 0)
10
    counter += (counter_speed * sin(spotlight_radius));
11
else
12
    counter += counter_speed;
13
update_spotlights();
14
if (!alert)
15
{
16
    with (obj_mizzle_spotlight)
17
    {
18
        if (point_distance(x, y, obj_heart.x + 10, obj_heart.y + 10) < 30)
19
        {
20
            other.alert = true;
21
            snd_play(snd_rocket);
22
            global.turntimer = 180;
23
            with (obj_mizzle_enemy)
24
            {
25
                if (global.monsterstatus[myself] != 0)
26
                    wakeuptext();
27
                global.monsterstatus[myself] = 0;
28
                global.monstercomment[myself] = "";
29
                awake = true;
30
            }
31
            with (obj_mizzle_spotlight_eye)
32
                con = 1;
33
            with (obj_holywater_spiral)
34
                instance_destroy();
35
            with (obj_regularbullet)
36
            {
37
                if (object_index != obj_mizzle_spotlight_eye)
38
                    instance_destroy();
39
            }
40
            break;
41
        }
42
    }
43
}