Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_homealone_bathroom_eavesdrop_Step_0

(view raw script w/o annotations or w/e)
1
if (start_speech)
2
{
3
    start_speech = false;
4
    current_text = speech[current_index];
5
    dhaver = 1;
6
    alarm[0]
 = speech_time * 2;
gml_Object_obj_homealone_bathroom_eavesdrop_Alarm_0.gml

if (!stop_speech) { current_index++; if (current_index > (array_length_1d(speech) - 1)) stop_speech = true; }
7
}
8
if (stop_speech)
9
{
10
    speech_alpha = 
scr_movetowards
scr_movetowards

function
scr_movetowards(arg0, arg1, arg2)
{ if (arg0 == arg1) return arg0; else if (arg0 > arg1) return max(arg0 - arg2, arg1); else return min(arg0 + arg2, arg1); } function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0) { scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1); } function scr_obj_movetowards_point(arg0, arg1, arg2) { var _distance = point_distance(x, y, arg0, arg1); if (arg2 >= _distance) { x = arg0; y = arg1; } else { var _direction = point_direction(x, y, arg0, arg1); x += lengthdir_x(arg2, _direction); y += lengthdir_y(arg2, _direction); } }
(speech_alpha, 0, 0.2);
11
    if (speech_alpha <= 0)
12
    {
13
        stop_speech = false;
14
        instance_destroy();
15
        exit;
16
    }
17
}