|
1
|
_parent = -4;
|
|
2
|
_bullet_sprite = -4;
|
|
3
|
_timer = 0;
|
|
4
|
_modifier = 1;
|
|
5
|
_hover_active = false;
|
|
6
|
_spawner = -4;
|
|
7
|
_sparkle = -4;
|
|
8
|
_end_sequence = false;
|
|
9
|
_index = 0;
|
|
10
|
_fade_alpha = 0;
|
|
11
|
_white_alpha = 0;
|
|
12
|
_enable_afterimage = false;
|
|
13
|
|
|
14
|
init = function(arg0, arg1, arg2, arg3, arg4, arg5)
|
|
15
|
{
|
|
16
|
_parent = arg0;
|
|
17
|
sprite_index = arg1;
|
|
18
|
x = arg2.x;
|
|
19
|
y = arg2.y;
|
|
20
|
_bullet_sprite = arg3;
|
|
21
|
_modifier = arg5;
|
|
22
|
image_yscale = 2;
|
|
23
|
image_xscale = -2;
|
|
24
|
image_angle = arg4;
|
|
25
|
if (image_angle >= 180)
|
|
26
|
image_yscale = -2;
|
|
27
|
image_alpha = 0;
|
|
28
|
};
|
|
29
|
|
|
30
|
set_index = function(arg0)
|
|
31
|
{
|
|
32
|
_index = arg0;
|
|
33
|
};
|
|
34
|
|
|
35
|
fade_in = function(arg0)
|
|
36
|
{
|
|
37
|
scr_depthscr_depth
function scr_depth(arg0 = id, arg1 = 0)
{
with (arg0)
depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10));
} ();
|
|
38
|
start_hover();
|
|
39
|
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;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = 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;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (function()
|
|
40
|
{
|
|
41
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
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_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("image_alpha", 0, 0.4, 20);
|
|
42
|
}, arg0 + 1);
|
|
43
|
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;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = 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;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (function()
|
|
44
|
{
|
|
45
|
start_sparkles();
|
|
46
|
}, arg0 + 1 + 16);
|
|
47
|
};
|
|
48
|
|
|
49
|
start_hover = function()
|
|
50
|
{
|
|
51
|
_hover_active = true;
|
|
52
|
};
|
|
53
|
|
|
54
|
start_sparkles = function()
|
|
55
|
{
|
|
56
|
_sparkle = instance_create(x, y, obj_ch5_DW29_power_up_sparkle);
|
|
57
|
_sparkle.start(depth + 10, id);
|
|
58
|
};
|
|
59
|
|
|
60
|
start_bullets = function()
|
|
61
|
{
|
|
62
|
_spawner = instance_create(0, 0, obj_ch5_DW29_power_up_bullet_spawner);
|
|
63
|
_spawner.start_spawning(id, new Vector2(x, y - 10), new Vector2(view_wport[0] / 2, (cameray() + 300) - 20), _bullet_sprite);
|
|
64
|
};
|
|
65
|
|
|
66
|
stop = function()
|
|
67
|
{
|
|
68
|
with (_spawner)
|
|
69
|
fade_out();
|
|
70
|
};
|
|
71
|
|
|
72
|
trigger_event = function(arg0)
|
|
73
|
{
|
|
74
|
};
|
|
75
|
|
|
76
|
end_sequence = function()
|
|
77
|
{
|
|
78
|
_hover_active = false;
|
|
79
|
var delay = 10 + (_index * 8);
|
|
80
|
scr_delay_var("_timer", 30, delay);
|
|
81
|
scr_delay_var("_end_sequence", true, delay);
|
|
82
|
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;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = 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;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (function()
|
|
83
|
{
|
|
84
|
scr_lerp_var_instance(id, "_fade_alpha", 0, 1, 30);
|
|
85
|
}, delay);
|
|
86
|
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;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = 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;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (function()
|
|
87
|
{
|
|
88
|
snd_play_x(snd_japanese_yo_hit2, 0.25, 1);
|
|
89
|
scr_lerp_var_instance(id, "_white_alpha", 0, 1, 12);
|
|
90
|
with (_sparkle)
|
|
91
|
fade_out();
|
|
92
|
}, delay + 20);
|
|
93
|
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;
}
function scr_script_delayed_until()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed_function);
__scriptdelay.script = argument[0];
__scriptdelay.condition = 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;
}
function delay_function(arg0, arg1)
{
return scr_script_delayed(arg0, arg1);
} (function()
|
|
94
|
{
|
|
95
|
_end_sequence = false;
|
|
96
|
with (_sparkle)
|
|
97
|
clean_up();
|
|
98
|
with (_parent)
|
|
99
|
trigger_event("enemy_finished");
|
|
100
|
}, delay + 31);
|
|
101
|
};
|
|
102
|
|
|
103
|
clean_up = function()
|
|
104
|
{
|
|
105
|
_hover_active = false;
|
|
106
|
_end_sequence = false;
|
|
107
|
with (_bullet_sprite)
|
|
108
|
instance_destroy();
|
|
109
|
with (_spawner)
|
|
110
|
clean_up();
|
|
111
|
instance_destroy();
|
|
112
|
};
|