1 |
if (state == 0) |
2 |
{ |
3 |
if (image_xscale < 1) |
4 |
{ |
5 |
image_xscale += 0.2; |
6 |
image_yscale += 0.2; |
7 |
} |
8 |
if (image_xscale >= 1) |
9 |
{ |
10 |
state = 1; |
11 |
image_index = 1; |
12 |
timer = -10; |
13 |
} |
14 |
} |
15 |
if (state > 0) |
16 |
draw_sprite(sprite_index, 2, x, y); |
17 |
if (state == 1) |
18 |
{ |
19 |
draw_sprite(sprite_index, 3, x, y); |
20 |
var _count = clamp(floor(timer / 2), 0, string_length(targetstring)); |
21 |
draw_set_color(c_black); |
22 |
scr_84_set_draw_font("main"); |
23 |
var _finalstring = string_copy(targetstring, 0, _count); |
24 |
if (_count == 0 || _count == string_length(targetstring)) |
25 |
{ |
26 |
typetimer++; |
27 |
if (!firsttime) |
28 |
typetimer++; |
29 |
if ((typetimer % 30) < 15) |
30 |
_finalstring += "|"; |
31 |
} |
32 |
else |
33 |
{ |
34 |
typetimer = 0; |
35 |
} |
36 |
draw_text(x - 48, y - 7, _finalstring); |
37 |
timer++; |
38 |
if (!firsttime && search > -1 && search < 3) |
39 |
timer++; |
40 |
if (timer >= (45 + spawndelay)) |
41 |
state = 2; |
42 |
} |
43 |
draw_self(); |
44 |
if (state == 2) |
45 |
{ |
46 |
if (search == 1) |
47 |
{ |
48 |
d = instance_create(x - (20 * sign(obj_growtangle.x - x)), y + 12, obj_queen_search_gun); |
49 |
d.damage = damage; |
50 |
d.target = target; |
51 |
d.parentwindow = self; |
52 |
state = 3; |
53 |
} |
54 |
else if (search == 2) |
55 |
{ |
56 |
d = instance_create(x, y, obj_queen_search_flail); |
57 |
d.damage = damage; |
58 |
d.target = target; |
59 |
d.parentwindow = self; |
60 |
state = 3; |
61 |
} |
62 |
else if (search == 3) |
63 |
{ |
64 |
d = instance_create(x, y, obj_queen_search_image); |
65 |
d.parentwindow = self; |
66 |
state = 3; |
67 |
} |
68 |
else |
69 |
{ |
70 |
image_xscale -= 0.2; |
71 |
image_yscale -= 0.2; |
72 |
if (image_xscale <= 0) |
73 |
instance_destroy(); |
74 |
} |
75 |
} |