| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
if (x < (0 - sprite_width) || x > (room_width + sprite_width)) |
| 4 |
instance_destroy(); |
| 5 |
switch (step) |
| 6 |
{ |
| 7 |
case 0: |
| 8 |
if (image_alpha < 1) |
| 9 |
{ |
| 10 |
image_alpha += 0.02; |
| 11 |
} |
| 12 |
else |
| 13 |
{ |
| 14 |
if (x < (room_width / 2)) |
| 15 |
rot_dir = 1; |
| 16 |
else |
| 17 |
rot_dir = -1; |
| 18 |
step++; |
| 19 |
} |
| 20 |
break; |
| 21 |
case 1: |
| 22 |
if (x < -100 || x > (room_width + 100)) |
| 23 |
instance_destroy(); |
| 24 |
image_speed = 2; |
| 25 |
image_angle += (5 * rot_dir); |
| 26 |
yspd += grav; |
| 27 |
if (place_meeting(x, y + yspd, obj_flowey_battle_phase_2_clay_floor)) |
| 28 |
{ |
| 29 |
while (!place_meeting(x, y + sign(yspd), obj_flowey_battle_phase_2_clay_floor)) |
| 30 |
y += sign(yspd); |
| 31 |
yspd *= -bounce_percent; |
| 32 |
xspd = 10; |
| 33 |
} |
| 34 |
x -= (xspd * rot_dir); |
| 35 |
y += yspd; |
| 36 |
xspd *= 0.95; |
| 37 |
break; |
| 38 |
} |