|
1
|
if (fresh == 0)
|
|
2
|
{
|
|
3
|
image_alpha = 1;
|
|
4
|
if (skipsound == 0)
|
|
5
|
snd_play(snd_petrify);
|
|
6
|
if (global.flag[55 enemy_x] != 0 && global.flag[56 enemy_y] != 0)
|
|
7
|
returntoxy = 1;
|
|
8
|
fresh = 2;
|
|
9
|
}
|
|
10
|
if (fresh == 1)
|
|
11
|
{
|
|
12
|
image_alpha = 0;
|
|
13
|
scr_lerpvar_instancescr_lerpvar_instance
function scr_lerpvar_instance()
{
__lerpvar = instance_create(0, 0, obj_lerpvar);
__lerpvar.target = argument[0];
__lerpvar.varname = argument[1];
__lerpvar.pointa = argument[2];
__lerpvar.pointb = argument[3];
__lerpvar.maxtime = argument[4];
if (argument_count >= 6)
__lerpvar.easetype = argument[5];
if (argument_count >= 7)
__lerpvar.easeinout = argument[6];
return __lerpvar;
} (id, "image_alpha", 0, 1, 2);
|
|
14
|
timer = 1;
|
|
15
|
fresh = 2;
|
|
16
|
if (depth < 1000)
|
|
17
|
scr_depth_altscr_depth_alt
function scr_depth_alt()
{
depth = 100000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10));
} ();
|
|
18
|
if (skipsolid == 0)
|
|
19
|
mysolid = scr_create_hitbox_solidscr_create_hitbox_solid
function scr_create_hitbox_solid()
{
var _hitboxwidth = bbox_right - bbox_left;
var _hitboxheight = bbox_bottom - bbox_top;
___createdsolid = instance_create(bbox_left, bbox_top, obj_soliddark);
___createdsolid.image_xscale = 0.025 * _hitboxwidth;
___createdsolid.image_yscale = 0.025 * _hitboxheight;
return ___createdsolid;
} ();
|
|
20
|
}
|
|
21
|
if (global.fighting == 0 && fresh == 2)
|
|
22
|
{
|
|
23
|
fresh = 3;
|
|
24
|
if (returntoxy == 1)
|
|
25
|
{
|
|
26
|
fresh = 5;
|
|
27
|
remx = global.flag[55 enemy_x];
|
|
28
|
remy = global.flag[56 enemy_y];
|
|
29
|
if (sprite_index == spr_virovirokun_hurt && room == room_dw_city_big_1)
|
|
30
|
{
|
|
31
|
remx = 224;
|
|
32
|
remy = 72;
|
|
33
|
}
|
|
34
|
if (sprite_index == spr_virovirokun_hurt && room == room_dw_city_roadblock)
|
|
35
|
{
|
|
36
|
remx = 1000;
|
|
37
|
remy = 588;
|
|
38
|
}
|
|
39
|
global.flag[55 enemy_x] = 0;
|
|
40
|
global.flag[56 enemy_y] = 0;
|
|
41
|
if (remx == 0)
|
|
42
|
instance_destroy();
|
|
43
|
}
|
|
44
|
}
|
|
45
|
if (fresh == 5)
|
|
46
|
{
|
|
47
|
image_alpha -= 0.2;
|
|
48
|
if (image_alpha < 0)
|
|
49
|
fresh = 6;
|
|
50
|
}
|
|
51
|
if (fresh == 6)
|
|
52
|
{
|
|
53
|
x = remx;
|
|
54
|
y = remy;
|
|
55
|
if (depth < 1000)
|
|
56
|
scr_depth_altscr_depth_alt
function scr_depth_alt()
{
depth = 100000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10));
} ();
|
|
57
|
if (image_alpha < 1)
|
|
58
|
image_alpha += 0.2;
|
|
59
|
}
|
|
60
|
draw_self();
|
|
61
|
if (timer < 1)
|
|
62
|
timer += 0.05;
|
|
63
|
var t = (sprite_height / 2) - (timer * (sprite_height / 2));
|
|
64
|
d3d_set_fog(true, specialcolor, 0, 0);
|
|
65
|
yoffset = -(sprite_get_yoffset(sprite_index) * image_yscale);
|
|
66
|
xoffset = -(sprite_get_xoffset(sprite_index) * image_xscale);
|
|
67
|
draw_sprite_part_ext(sprite_index, image_index, 0, t, sprite_width, sprite_height - t, (x - 2) + xoffset, (y - 2) + (t * 2) + yoffset, image_xscale, image_yscale, c_blue, image_alpha * 0.8);
|
|
68
|
draw_sprite_part_ext(sprite_index, image_index, 0, t, sprite_width, sprite_height - t, x + 2 + xoffset, (y - 2) + (t * 2) + yoffset, image_xscale, image_yscale, c_blue, image_alpha * 0.4);
|
|
69
|
draw_sprite_part_ext(sprite_index, image_index, 0, t, sprite_width, sprite_height - t, (x - 2) + xoffset, y + 2 + (t * 2) + yoffset, image_xscale, image_yscale, c_blue, image_alpha * 0.4);
|
|
70
|
draw_sprite_part_ext(sprite_index, image_index, 0, t, sprite_width, sprite_height - t, x + 2 + xoffset, y + 2 + (t * 2) + yoffset, image_xscale, image_yscale, c_blue, image_alpha * 0.8);
|
|
71
|
d3d_set_fog(false, c_white, 0, 0);
|
|
72
|
draw_set_blend_mode(bm_add);
|
|
73
|
draw_sprite_part_ext(sprite_index, image_index, 0, t, sprite_width, sprite_height - t, x + xoffset, y + (t * 2) + yoffset, image_xscale, image_yscale, specialcolor, image_alpha * 0.4);
|
|
74
|
draw_set_blend_mode(bm_normal);
|
|
75
|
if (room == room_dw_city_berdly)
|
|
76
|
{
|
|
77
|
timer++;
|
|
78
|
if (timer > 60)
|
|
79
|
image_alpha = lerp(image_alpha, 0, 0.1);
|
|
80
|
if (image_alpha == 0)
|
|
81
|
instance_destroy();
|
|
82
|
}
|