|
1
|
if (_paused)
|
|
2
|
exit;
|
|
3
|
if (_state == 0)
|
|
4
|
{
|
|
5
|
_timer++;
|
|
6
|
if (_timer == 1)
|
|
7
|
{
|
|
8
|
_alt++;
|
|
9
|
image_index = ((_alt % 2) == 1) ? 0 : 1;
|
|
10
|
var _direction = point_direction(x, y, _x_target, _y_target);
|
|
11
|
var target_x = x + (lengthdir_x(_x_target, _direction) / 6);
|
|
12
|
if (target_x >= _x_target)
|
|
13
|
target_x = _x_target;
|
|
14
|
var target_y = y + (lengthdir_y(_y_target, _direction) / 6);
|
|
15
|
if (target_y >= _y_target)
|
|
16
|
target_y = _y_target;
|
|
17
|
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;
} ("x", x, target_x, 12, 2, "out");
|
|
18
|
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;
} ("y", y, target_y, 12, 2, "out");
|
|
19
|
snd_play_x(snd_wing, 0.7, 1);
|
|
20
|
_xx = x;
|
|
21
|
_yy = y;
|
|
22
|
_shake = true;
|
|
23
|
shakeamt = 5;
|
|
24
|
shakereduct = 0.8;
|
|
25
|
on = 1;
|
|
26
|
}
|
|
27
|
if (_shake)
|
|
28
|
{
|
|
29
|
shakeamt -= shakereduct;
|
|
30
|
on *= -1;
|
|
31
|
_xx = x + (shakeamt * on);
|
|
32
|
_yy = y;
|
|
33
|
if (shakeamt <= 0)
|
|
34
|
{
|
|
35
|
_shake = false;
|
|
36
|
_xx = x;
|
|
37
|
}
|
|
38
|
}
|
|
39
|
if (_timer == 60)
|
|
40
|
_timer = 0;
|
|
41
|
if (_timer >= 13 && x >= _x_target && y >= _y_target)
|
|
42
|
{
|
|
43
|
_state = 1;
|
|
44
|
scr_var_delayscr_var_delay
function scr_var_delay(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_var_delayed(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var(arg0, arg1, arg2)
{
scr_script_delayed(scr_var, arg2, arg0, arg1);
}
function scr_delay_var_until(arg0, arg1, arg2)
{
scr_script_delayed_until(scr_var, arg2, arg0, arg1);
} ("_state", 2, 30);
|
|
45
|
_alt = 0;
|
|
46
|
x = _x_target;
|
|
47
|
y = _y_target;
|
|
48
|
_xx = x;
|
|
49
|
_yy = y;
|
|
50
|
}
|
|
51
|
}
|