1 |
if (init == 0) |
2 |
{ |
3 |
remx = x |
4 |
movetimer++ |
5 |
init = 1 |
6 |
} |
7 |
if (con == 0) |
8 |
{ |
9 |
movetimer++ |
10 |
if (movetimer <= 14) |
11 |
y = lerp(y, yspot[ycurrent], 0.122) |
12 |
else |
13 |
{ |
14 |
movetimer = 0 |
15 |
count++ |
16 |
ycurrent++ |
17 |
if (ycurrent >= 2) |
18 |
ycurrent = 0 |
19 |
} |
20 |
shottimer++ |
21 |
if (shottimer >= choose(15)) |
22 |
{ |
23 |
lastshoty = y |
24 |
bigshot = instance_create((x + 100), (y + y_offset), obj_sneo_bigshot) |
25 |
bigshot.hspeed = -6 |
26 |
bigshot.friction = -0.25 |
27 |
shottimer = 0 + count / 4 |
28 |
shotmouthopen = 1 |
29 |
shotmouthopentimer = 0 |
30 |
rand = 70 + irandom(5) |
31 |
snd_play_x(snd_chargeshot_fire, 0.75, 0.7) |
32 |
} |
33 |
if (count == 10 || endattack == 1) |
34 |
{ |
35 |
con = 1 |
36 |
timer = 0 |
37 |
endattack = 1 |
38 |
} |
39 |
} |
40 |
if (shotmouthopen == 1) |
41 |
{ |
42 |
shotmouthopentimer++ |
43 |
mouthtopy = (-(sin(shotmouthopentimer / 3))) * 30 |
44 |
mouthbottomy = (-mouthtopy) |
45 |
mouthangle = mouthtopy |
46 |
if (mouthbottomy < 0) |
47 |
{ |
48 |
mouthangle = 0 |
49 |
mouthtopy = 0 |
50 |
mouthbottomy = 0 |
51 |
shotmouthopentimer = 0 |
52 |
shotmouthopen = 0 |
53 |
} |
54 |
} |
55 |
if (con == 1) |
56 |
{ |
57 |
timer++ |
58 |
y = lerp(y, ((yspot[0] + yspot[1]) / 2), 0.1) |
59 |
if (timer < 10) |
60 |
{ |
61 |
mouthbottomy = lerp(mouthbottomy, 0, 0.2) |
62 |
mouthtopy = lerp(mouthtopy, 20, 0.2) |
63 |
} |
64 |
if (timer >= 10 && timer < 25) |
65 |
{ |
66 |
mouthbottomy = lerp(mouthbottomy, 120, 0.04) |
67 |
mouthtopy = lerp(mouthtopy, -100, 0.04) |
68 |
mouthangle = lerp(mouthangle, -45, 0.05) |
69 |
} |
70 |
if (timer >= 10) |
71 |
{ |
72 |
mouthtopy += ((sin(timer * 2)) * 4) |
73 |
mouthbottomy -= ((sin(timer * 2)) * 4) |
74 |
mouthangle -= (sin(timer) * 5) |
75 |
x += random_range(-1, 1) |
76 |
y += random_range(-1, 1) |
77 |
} |
78 |
if (timer == 11) |
79 |
{ |
80 |
bigshot = instance_create((x + 131), (y + y_offset), obj_sneo_bigshot) |
81 |
bigshot.image_xscale = 0 |
82 |
bigshot.image_yscale = 0 |
83 |
bigshot.sprite_index = spr_sneo_bigshot_l |
84 |
shottimer = 0 |
85 |
snd_play_x(snd_chargeshot_fire, 0.7, 0.4) |
86 |
snd_play_x(snd_chargeshot_fire, 0.7, 0.6) |
87 |
snd_play_x(snd_chargeshot_fire, 0.7, 0.8) |
88 |
snd_play_x(snd_chargeshot_fire, 0.7, 0.9) |
89 |
} |
90 |
} |