Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkshape_giant_Step_0

(view raw script w/o annotations or w/e)
1
if (!i_ex(obj_darkshape_manager))
2
    exit;
3
if (fast_timer)
4
{
5
    timer += fastval;
6
    fast_timer--;
7
}
8
else
9
{
10
    timer++;
11
}
12
true_timer++;
13
if (!irandom(20))
14
    fast_timer = 10 + irandom(6);
15
if (image_alpha != 1)
16
{
17
    image_alpha = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(image_alpha, 1, 0.05);
18
    if (image_alpha == 1)
19
        direction = 
scr_at_player
scr_at_player

function
scr_at_player(arg0 = x, arg1 = y)
{ return point_direction(arg0, arg1, obj_heart.x + (obj_heart.sprite_width / 2), obj_heart.y + (obj_heart.sprite_height / 2)); }
(x, y);
20
}
21
if (image_alpha == 1)
22
{
23
    xscale = image_alpha;
24
    yscale = image_alpha;
25
}
26
else
27
{
28
    xscale = image_alpha + ((timer % 2) * 0.1);
29
    yscale = image_alpha + ((timer % 2) * 0.1);
30
}
31
if (light < 1)
32
{
33
    x_goal = 
scr_get_box
scr_get_box

function
scr_get_box(arg0)
{ switch (arg0) { case 0: return obj_growtangle.x + (obj_growtangle.sprite_width * 0.5); break; case 1: return obj_growtangle.y - (obj_growtangle.sprite_height * 0.5); break; case 2: return obj_growtangle.x - (obj_growtangle.sprite_width * 0.5); break; case 3: return obj_growtangle.y + (obj_growtangle.sprite_height * 0.5); break; case 4: return obj_growtangle.x; break; case 5: return obj_growtangle.y; break; return false; } }
(4) + lengthdir_x(box_distance, box_angle);
34
    y_goal = 
scr_get_box
scr_get_box

function
scr_get_box(arg0)
{ switch (arg0) { case 0: return obj_growtangle.x + (obj_growtangle.sprite_width * 0.5); break; case 1: return obj_growtangle.y - (obj_growtangle.sprite_height * 0.5); break; case 2: return obj_growtangle.x - (obj_growtangle.sprite_width * 0.5); break; case 3: return obj_growtangle.y + (obj_growtangle.sprite_height * 0.5); break; case 4: return obj_growtangle.x; break; case 5: return obj_growtangle.y; break; return false; } }
(5) + lengthdir_y(box_distance, box_angle);
35
    x = x_goal;
36
    y = y_goal;
37
    x = x_goal + (sin(true_timer * 0.1) * 4);
38
    y = y_goal + (cos(true_timer * 0.065) * 4);
39
    chase_heart();
40
}
41
if (phase == "sudden reposition")
42
{
43
    phase_timer++;
44
    if (phase_timer == 15)
45
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("box_distance", 220, 180, 10, 2, "in");
46
    if (phase_timer == 25)
47
    {
48
        with (
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("box_distance", 180, 100, 32, 2, "out"))
49
            movevar = true;
50
        with (
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("box_angle", box_angle, box_angle + choose(240, -240), 32, 2, "out"))
51
            movevar = true;
52
    }
53
    if (phase_timer > 25 && phase_timer < 47)
54
    {
55
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen(arg0 = 4, arg1 = 4)
{ var shaker = instance_create(x, y, obj_shake); if (i_ex(shaker)) { shaker.shakex = arg0; shaker.shakey = arg1; } }
(4, 4);
56
        
scr_afterimagefast
scr_afterimagefast

function
scr_afterimagefast()
{ afterimage = instance_create(x, y, obj_afterimage); 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; afterimage.fadeSpeed = 0.08; return afterimage; }
();
57
    }
58
    if (((phase_timer - 25) % 4) == 0 && (phase_timer - 25) > 4 && (phase_timer - 25) < 28)
59
    {
60
        snd_play(snd_knight_jump_quick, 1, 0.5);
61
        with (
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x, y, obj_darkshape_spawnbullet, point_direction(x, y, xprevious, yprevious), 4))
62
        {
63
            depth = other.depth - 1;
64
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("speed", 4, 2, 12);
65
            image_xscale = 2;
66
            image_yscale = 2;
67
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_xscale", 2, 1.25, 12);
68
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_yscale", 2, 1.25, 12);
69
        }
70
    }
71
    if ((phase_timer - 25) == 32)
72
    {
73
        image_s = 0.25;
74
        image_d = 0;
75
        image_max = 4;
76
        image_min = 2;
77
        phase_timer = 0;
78
        phase = "stalk";
79
    }
80
}
81
if (phase == "stalk")
82
{
83
    phase_timer++;
84
    if (phase_timer == -15)
85
    {
86
        image_s = 0.25;
87
        image_d = 0;
88
        image_max = 4;
89
        image_min = 2;
90
        phase_timer = 15;
91
    }
92
    if (phase_timer == 15)
93
        shakeme = true;
94
    if (phase_timer == 40 || phase_timer == 60 || phase_timer == 80)
95
    {
96
        shakeme = false;
97
        snd_play(snd_knight_jump_quick, 1, 0.5);
98
        image_min = 0;
99
        image_max = 4;
100
        image_d = 2.99;
101
        image_s = -0.5;
102
        var times = 3;
103
        if (phase_timer == 60)
104
            times = 5;
105
        for (var a = 0; a < times; a++)
106
        {
107
            with (
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x, y, obj_darkshape_spawnbullet, (
scr_at_player
scr_at_player

function
scr_at_player(arg0 = x, arg1 = y)
{ return point_direction(arg0, arg1, obj_heart.x + (obj_heart.sprite_width / 2), obj_heart.y + (obj_heart.sprite_height / 2)); }
(x, y) - (15 * (times - 1))) + (30 * a), 8))
108
            {
109
                target = 4;
110
                damage = 90;
111
                if ((a % 2) != 0)
112
                    blank = true;
113
                var speed_mod = abs(a - (times * 0.5)) * 1.5;
114
                depth = other.depth - 1;
115
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("speed", 8 - speed_mod, 5 - (speed_mod * 0.65), 12);
116
                image_xscale = 2;
117
                image_yscale = 2;
118
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_xscale", 2, 1.25, 12);
119
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_yscale", 2, 1.25, 12);
120
            }
121
        }
122
    }
123
    if (phase_timer == 50 || phase_timer == 70 || phase_timer == 90)
124
    {
125
        image_d = 2;
126
        image_s = 0.25;
127
        image_max = 4;
128
        image_min = 2;
129
    }
130
    if (phase_timer == 120)
131
    {
132
        phase_timer = 0;
133
        phase = "encircle";
134
    }
135
}
136
if (phase == "encircle")
137
{
138
    phase_timer++;
139
    if (phase_timer == 1)
140
    {
141
        light_treshold *= 0.5;
142
        with (
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("box_angle", box_angle, box_angle + choose(-120, 120), 24, 1, "out"))
143
            movevar = true;
144
    }
145
    if (phase_timer == 40)
146
    {
147
        phase_timer = 0;
148
        phase = "stalk";
149
    }
150
}
151
if (phase == "death")
152
{
153
    phase_timer++;
154
    audio_sound_pitch(deathrattle, audio_sound_get_pitch(deathrattle) - 0.02);
155
    big_shrink = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(big_shrink, 0, 0.020833333333333332);
156
    var randir = irandom(360);
157
    with (instance_create_depth(x + lengthdir_x(32, randir), y + lengthdir_y(32, randir), depth + 2, obj_particle_generic))
158
    {
159
        image_xscale *= 2;
160
        image_yscale *= 2;
161
        sprite_index = spr_ring_particle1;
162
        image_blend = c_white;
163
        direction = point_direction(other.x, other.y, x, y);
164
        speed = 2 + random(6);
165
        shrink_rate = 0.15 + random(0.1);
166
    }
167
    if (phase_timer == 16 || phase_timer == 32)
168
    {
169
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, x + lengthdir_x(50, death_dir), 12, 1, "out");
170
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, y + lengthdir_y(50, death_dir), 12, 1, "out");
171
        death_dir += choose(-100, 100);
172
        with (instance_create_depth(x, y, depth, obj_bulletparent))
173
        {
174
            image_xscale = 0.25;
175
            image_yscale = 0.25;
176
            sprite_index = spr_finisher_explosion;
177
            image_index = 2;
178
            image_speed = 0.5;
179
            image_blend = c_gray;
180
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_xscale", 0.25, 1.25, 8);
181
            
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("image_yscale", 0.25, 1.25, 8);
182
            
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(instance_destroy, 8);
183
        }
184
    }
185
    if (phase_timer == 48)
186
    {
187
        snd_play(snd_explosion);
188
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen(arg0 = 4, arg1 = 4)
{ var shaker = instance_create(x, y, obj_shake); if (i_ex(shaker)) { shaker.shakex = arg0; shaker.shakey = arg1; } }
();
189
        repeat (16)
190
        {
191
            randir = irandom(360);
192
            with (instance_create_depth(x + lengthdir_x(32, randir), y + lengthdir_y(32, randir), depth + 2, obj_particle_generic))
193
            {
194
                image_xscale *= (2 + random(1));
195
                image_yscale *= (1 - random(0.25));
196
                sprite_index = spr_ring_particle1;
197
                image_blend = c_white;
198
                direction = point_direction(other.x, other.y, x, y);
199
                image_angle = direction;
200
                speed = 8 + random(6);
201
                shrink_rate = 0.075 + random(0.05);
202
            }
203
        }
204
        with (instance_create_depth(x, y, depth, obj_battle_marker))
205
        {
206
            var bb = irandom(4);
207
            destroyoncomplete = true;
208
            sprite_index = spr_titan_shockwave_bullet_explosion;
209
            image_index = 0;
210
            image_speed = 1;
211
            image_alpha = 1;
212
            image_angle = irandom(360);
213
            image_xscale = 1;
214
            image_yscale = 0.5;
215
        }
216
        with (instance_create_depth(x, y, depth, obj_battle_marker))
217
        {
218
            var bb = irandom(4);
219
            destroyoncomplete = true;
220
            sprite_index = spr_titan_shockwave_bullet_explosion;
221
            image_index = 0;
222
            image_speed = 0.75;
223
            image_alpha = 1;
224
            image_angle = irandom(360);
225
            image_xscale = 1.5;
226
            image_yscale = 0.75;
227
        }
228
        with (instance_create_depth(x, y, depth, obj_battle_marker))
229
        {
230
            var bb = irandom(4);
231
            destroyoncomplete = true;
232
            sprite_index = spr_titan_shockwave_bullet_explosion;
233
            image_index = 0;
234
            image_speed = 0.5;
235
            image_alpha = 1;
236
            image_angle = irandom(360);
237
            image_xscale = 2;
238
            image_yscale = 1;
239
        }
240
        instance_destroy();
241
        global.turntimer = 30;
242
    }
243
}
244
image_d = clamp(image_d, image_min, image_max);
245
image_d += image_s;
246
if (image_d >= image_max)
247
    image_d -= (image_max - image_min);
248
if (image_d < 0)
249
{
250
    image_d = 0;
251
    image_s = 0;
252
}
253
image_index = image_d;
254
light_damage = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(light_damage, 0, 0.04);