|
1
|
if (i_ex(obj_dmgwriter))
|
|
2
|
depth = obj_dmgwriter.depth + 1;
|
|
3
|
if (global.turntimer < 1)
|
|
4
|
{
|
|
5
|
instance_destroy();
|
|
6
|
exit;
|
|
7
|
}
|
|
8
|
if (instance_exists(obj_shutta_rotation_attack) && obj_shutta_rotation_attack.freeze)
|
|
9
|
{
|
|
10
|
freeze = true;
|
|
11
|
image_speed = 0;
|
|
12
|
}
|
|
13
|
if (freeze)
|
|
14
|
exit;
|
|
15
|
speed_approach = 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_approach, 0.5, 0.125);
|
|
16
|
if ((y + 58) > (scr_get_boxscr_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;
}
} (3) - 24))
|
|
17
|
dir = 1;
|
|
18
|
if ((y + 58) < (scr_get_boxscr_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;
}
} (1) + 24))
|
|
19
|
dir = 0;
|
|
20
|
if (!skipme && sameattacker != 2)
|
|
21
|
{
|
|
22
|
if (dir == 0)
|
|
23
|
current_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;
} (current_speed, 6, speed_approach);
|
|
24
|
else
|
|
25
|
current_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;
} (current_speed, -6, speed_approach);
|
|
26
|
}
|
|
27
|
if (global.turntimer <= 16 && !skipme)
|
|
28
|
skipme = true;
|
|
29
|
if (skipme)
|
|
30
|
current_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;
} (current_speed, 0, 0.5);
|
|
31
|
timer++;
|
|
32
|
if (sameattacker == 2)
|
|
33
|
{
|
|
34
|
if (bullet_timer)
|
|
35
|
{
|
|
36
|
bullet_timer--;
|
|
37
|
}
|
|
38
|
else
|
|
39
|
{
|
|
40
|
if (bullet_counter == 0)
|
|
41
|
shot_angle = scr_at_playerscr_at_player
function scr_at_player(arg0 = x, arg1 = y)
{
return point_direction(arg0, arg1, obj_heart.x + 10, obj_heart.y + 10);
} (x, y + 54);
|
|
42
|
var tommybullet = 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 + 54, obj_regularbullet, shot_angle, 7, spr_tommygun_bullet);
|
|
43
|
if (!instance_exists(obj_shutta_rotation_attack))
|
|
44
|
{
|
|
45
|
with (tommybullet)
|
|
46
|
scr_script_delayedscr_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;
} (scr_lerpvar_instance, abs(x - scr_get_boxscr_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;
}
} (2)) / abs(hspeed), id, "image_alpha", 1, 0, 10);
|
|
47
|
}
|
|
48
|
tommybullet.image_angle = tommybullet.direction;
|
|
49
|
with (obj_regularbullet)
|
|
50
|
target = 0;
|
|
51
|
if (i_ex(obj_volumeup))
|
|
52
|
{
|
|
53
|
tommybullet.image_xscale = 2;
|
|
54
|
tommybullet.image_yscale = 2;
|
|
55
|
tommybullet.grazepoints += 1;
|
|
56
|
tommybullet.x += 30;
|
|
57
|
}
|
|
58
|
bullet_timer = 6;
|
|
59
|
bullet_counter++;
|
|
60
|
if (bullet_counter == 4)
|
|
61
|
{
|
|
62
|
bullet_counter = 0;
|
|
63
|
bullet_timer += 8;
|
|
64
|
}
|
|
65
|
}
|
|
66
|
}
|
|
67
|
else if ((timer - (sameattacker * 12)) >= 16 && !skipme)
|
|
68
|
{
|
|
69
|
if (bullet_timer)
|
|
70
|
{
|
|
71
|
bullet_timer--;
|
|
72
|
}
|
|
73
|
else
|
|
74
|
{
|
|
75
|
var tommybullet = 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 + 54, obj_regularbullet, 180, 5.5 + random(3.5), spr_tommygun_bullet);
|
|
76
|
if (!instance_exists(obj_shutta_rotation_attack))
|
|
77
|
{
|
|
78
|
with (tommybullet)
|
|
79
|
scr_script_delayedscr_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;
} (scr_lerpvar_instance, abs(x - scr_get_boxscr_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;
}
} (2)) / abs(hspeed), id, "image_alpha", 1, 0, 10);
|
|
80
|
}
|
|
81
|
with (obj_regularbullet)
|
|
82
|
target = 0;
|
|
83
|
bullet_timer = irandom_range(8, 10) - (sameattack * 2);
|
|
84
|
tommybullet.image_angle = tommybullet.direction;
|
|
85
|
bullet_counter++;
|
|
86
|
if (i_ex(obj_volumeup))
|
|
87
|
{
|
|
88
|
tommybullet.image_xscale = 2;
|
|
89
|
tommybullet.image_yscale = 2;
|
|
90
|
tommybullet.grazepoints += 1;
|
|
91
|
tommybullet.x += 30;
|
|
92
|
}
|
|
93
|
if (bullet_counter == 4)
|
|
94
|
{
|
|
95
|
bullet_counter = 0;
|
|
96
|
bullet_timer += (10 + (irandom(1) * 5) + (4 * sameattack));
|
|
97
|
}
|
|
98
|
}
|
|
99
|
}
|