|
1
|
if (con == 2)
|
|
2
|
{
|
|
3
|
if (hittarget && enemy == 0)
|
|
4
|
{
|
|
5
|
snd_play_x(snd_barrel_jump, 0.8, 1.8);
|
|
6
|
var pointsmarker = instance_create(targetx, targety, obj_chefs_100pts);
|
|
7
|
pointsmarker.sprite_index = spr_chefs_plus1;
|
|
8
|
}
|
|
9
|
instance_destroy();
|
|
10
|
}
|
|
11
|
if (con == 1)
|
|
12
|
{
|
|
13
|
if (hittarget)
|
|
14
|
{
|
|
15
|
var impactfx = instance_create(targetx, targety, obj_animation);
|
|
16
|
impactfx.sprite_index = spr_attack_slap2;
|
|
17
|
impactfx.image_xscale = 2;
|
|
18
|
impactfx.image_yscale = 2;
|
|
19
|
impactfx.image_blend = c_white;
|
|
20
|
impactfx.depth = depth - 10;
|
|
21
|
impactfx = instance_create(targetx, targety, obj_animation);
|
|
22
|
impactfx.sprite_index = spr_attack_slap2;
|
|
23
|
impactfx.image_xscale = 3;
|
|
24
|
impactfx.image_yscale = 3;
|
|
25
|
impactfx.image_blend = c_white;
|
|
26
|
impactfx.depth = depth - 10;
|
|
27
|
impactfx.image_alpha = 0.5;
|
|
28
|
if (!enemy)
|
|
29
|
{
|
|
30
|
snd_play_x(snd_equip, 1, 0.8);
|
|
31
|
snd_play_x(snd_equip, 1, 1.2);
|
|
32
|
snd_play_x(snd_bump, 1, 0.5);
|
|
33
|
}
|
|
34
|
else
|
|
35
|
{
|
|
36
|
snd_play_x(snd_hurt1_bc, 0.8, 1);
|
|
37
|
snd_play_x(snd_bump, 1, 1);
|
|
38
|
snd_play_x(snd_equip, 1, 0.8);
|
|
39
|
scr_shakescreenscr_shakescreen
function scr_shakescreen()
{
instance_create(x, y, obj_shake);
} ();
|
|
40
|
}
|
|
41
|
}
|
|
42
|
else
|
|
43
|
{
|
|
44
|
var smokefx = scr_markerscr_marker
function scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (targetx, targety, sprite_index);
|
|
45
|
smokefx.gravity_direction = 200;
|
|
46
|
smokefx.gravity = 2 - random(0.4);
|
|
47
|
smokefx.image_speed = 0.2;
|
|
48
|
smokefx.hspeed = -6;
|
|
49
|
smokefx.image_xscale = 1;
|
|
50
|
smokefx.image_yscale = 1;
|
|
51
|
smokefx.vspeed = random_range(-8, -4);
|
|
52
|
smokefx.image_angle = random(360);
|
|
53
|
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;
}
function scr_lerp_var_instance()
{
if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
}
function scr_lerp_instance_var()
{
if (argument_count >= 6)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
scr_lerpvar_instance(argument0, argument1, argument2, argument3, argument4);
} (smokefx, "image_alpha", 2, 0, 8);
|
|
54
|
scr_doomscr_doom
function scr_doom(arg0, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{
alarm[0]
target = arg0;
}
} (smokefx, 8);
|
|
55
|
snd_play_x(snd_metal_hit_guard, 1, 1);
|
|
56
|
}
|
|
57
|
con = 2;
|
|
58
|
}
|
|
59
|
if (con == 0)
|
|
60
|
{
|
|
61
|
for (i = 0; i < 40; i++)
|
|
62
|
draw_sprite_ext(sprite_index, image_index, lerp(xstart, targetx, i / 40), lerp(ystart, targety, i / 40), image_xscale, image_yscale, image_angle, image_blend, 0.2 + (i / 80));
|
|
63
|
if (enemy == 1)
|
|
64
|
hittarget = 1;
|
|
65
|
con = 1;
|
|
66
|
}
|
|
67
|
else if (con == 2)
|
|
68
|
{
|
|
69
|
for (i = 0; i < 40; i++)
|
|
70
|
draw_sprite_ext(sprite_index, image_index, lerp(xstart, targetx, i / 40), lerp(ystart, targety, i / 40), image_xscale, image_yscale, image_angle, image_blend, (0.2 + (i / 80)) * 0.5);
|
|
71
|
}
|