1 |
if (active == 0) |
2 |
exit; |
3 |
if (other.object_index == obj_virovirokun_virus || (other.object_index == object_index && other.direction != 0)) |
4 |
exit; |
5 |
if (direction == 0 || other.object_index == obj_omawaroid_vaccine) |
6 |
{ |
7 |
active = 0; |
8 |
spawnVirus = 0; |
9 |
image_speed = 1; |
10 |
speed = 0; |
11 |
} |
12 |
else if (other.object_index != obj_virovirokun_needle || abs(angle_difference(other.direction, direction) > 90)) |
13 |
{ |
14 |
if (spawning == true) |
15 |
{ |
16 |
spawning = false; |
17 |
sprite_index = spr_virovirokun_needle; |
18 |
image_index = 0; |
19 |
} |
20 |
image_speed = 1; |
21 |
active = 0; |
22 |
spawnVirus = 1; |
23 |
image_speed = 1; |
24 |
speed = 0; |
25 |
infection = 1; |
26 |
if (other.object_index != obj_viro_needle) |
27 |
{ |
28 |
targetx = other.x; |
29 |
targety = other.y; |
30 |
targetsprite = other.sprite_index; |
31 |
targetimage = other.image_index; |
32 |
} |
33 |
else |
34 |
{ |
35 |
targetx = lerp(x, other.x, 0.5); |
36 |
targety = lerp(y, other.y, 0.5); |
37 |
poisoncolor = c_white; |
38 |
} |
39 |
instance_destroy(other); |
40 |
} |