|
1
|
event_inherited();
|
|
2
|
radius = 22;
|
|
3
|
light = 0;
|
|
4
|
|
|
5
|
do_shrivel = function()
|
|
6
|
{
|
|
7
|
if (light > 0.8)
|
|
8
|
image = 8;
|
|
9
|
else if (light > 0.6)
|
|
10
|
image = 6;
|
|
11
|
else if (light > 0.4)
|
|
12
|
image = 4;
|
|
13
|
else if (light > 0.2)
|
|
14
|
image = 2;
|
|
15
|
else
|
|
16
|
image = 0;
|
|
17
|
};
|
|
18
|
|
|
19
|
do_pushback = function()
|
|
20
|
{
|
|
21
|
with (obj_darkshape)
|
|
22
|
{
|
|
23
|
if (id != other.id && point_distance(x, y, other.x, other.y) < (other.radius * other.scalefactor))
|
|
24
|
{
|
|
25
|
var tempangle = point_direction(other.x, other.y, x, y);
|
|
26
|
x += lengthdir_x(1, tempangle);
|
|
27
|
y += lengthdir_y(1, tempangle);
|
|
28
|
}
|
|
29
|
}
|
|
30
|
};
|
|
31
|
|
|
32
|
check_death = function()
|
|
33
|
{
|
|
34
|
var hx = obj_heart.x + 10;
|
|
35
|
var hy = obj_heart.y + 10;
|
|
36
|
if (light == 1)
|
|
37
|
{
|
|
38
|
snd_play(snd_chargeshot_fire);
|
|
39
|
with (instance_create_depth(x, y, depth - 1, obj_battle_marker))
|
|
40
|
{
|
|
41
|
destroyoncomplete = true;
|
|
42
|
sprite_index = spr_shockwave_explosive;
|
|
43
|
image_blend = c_red;
|
|
44
|
image_speed = 0.5;
|
|
45
|
image_xscale = 2;
|
|
46
|
image_yscale = 2;
|
|
47
|
}
|
|
48
|
for (var aa = 0; aa < 5; aa++)
|
|
49
|
{
|
|
50
|
with (scr_fire_bulletscr_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_regularbullet, (scr_at_playerscr_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) - 60) + (30 * aa) + random_range(-5, 5), 1.5 + random(1.5), spr_darkshape_mine_bullet))
|
|
51
|
{
|
|
52
|
image_speed = 0.5;
|
|
53
|
image_xscale = 0.25;
|
|
54
|
image_yscale = choose(4, -4);
|
|
55
|
scr_lerpvarscr_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", image_xscale, 1, 10);
|
|
56
|
scr_lerpvarscr_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", image_yscale, 1, 10);
|
|
57
|
scr_lerpvarscr_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", speed, speed * 4, 30);
|
|
58
|
updateimageangle = true;
|
|
59
|
}
|
|
60
|
}
|
|
61
|
instance_destroy();
|
|
62
|
}
|
|
63
|
};
|
|
64
|
|
|
65
|
chase_heart = function()
|
|
66
|
{
|
|
67
|
var hx = obj_heart.x + 10;
|
|
68
|
var hy = obj_heart.y + 10;
|
|
69
|
if (i_ex(obj_heart))
|
|
70
|
{
|
|
71
|
if (point_distance(x, y, hx, hy) < 64 || light > 0)
|
|
72
|
{
|
|
73
|
if (light == 0.01)
|
|
74
|
snd_play_pitch(snd_swallow, 0.65);
|
|
75
|
speed = scr_approachscr_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;
} (speed, 0, speed * 0.05);
|
|
76
|
light = scr_approachscr_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, 1, 0.025);
|
|
77
|
}
|
|
78
|
else
|
|
79
|
{
|
|
80
|
speed = scr_approachscr_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;
} (speed, speed_max * speed_max_multiplier, accel * speed_max_multiplier * (1 - light));
|
|
81
|
}
|
|
82
|
var anglediff = angle_difference(direction, point_direction(x, y, hx, hy));
|
|
83
|
direction -= clamp(sign(anglediff) * tracking_val, -abs(anglediff), abs(anglediff));
|
|
84
|
}
|
|
85
|
};
|
|
86
|
|
|
87
|
image_xscale = 0.65;
|
|
88
|
image_yscale = 0.65;
|
|
89
|
scalefactor = 0.65;
|
|
90
|
alarm[0] = 60; gml_Object_obj_darkshape_mine_Alarm_0.gml
light += 0.01;
|