1 | if (init == 0) |
2 | { |
3 | if (random_image) |
4 | { |
5 | image_speed = 0; |
6 | image_index = irandom(image_number - 1); |
7 | } |
8 | init = 1; |
9 | } |
10 | if (rotation != 0) |
11 | image_angle += rotation; |
12 | if (destroyoffscreen && (x < (camerax() - 50) || x > (camerax() + 680) || y < (cameray() - 50) || y > (cameray() + 510))) |
13 | { |
14 | instance_destroy(); |
15 | } |
16 | else if (lifetime > 0) |
17 | { |
18 | lifetime--; |
19 | if (lifetime <= 0) |
20 | instance_destroy(); |
21 | else if (fadeondeath && lifetime < 10) |
22 | image_alpha = lifetime / 10; |
23 | } |