1 | var x_target = 100; |
2 | if (global.enemy_attacking == true) |
3 | destroy_self = true; |
4 | if (destroy_self == false) |
5 | { |
6 | if (x < (x_target - 0.01)) |
7 | x = lerp(x, x_target, 0.15); |
8 | else |
9 | x = x_target; |
10 | } |
11 | else if (x > (xstart + 0.01)) |
12 | { |
13 | x = lerp(x, xstart, 0.15); |
14 | } |
15 | else |
16 | { |
17 | instance_destroy(); |
18 | } |