1 |
if (global.snowdin_flag[2] == 0) |
2 |
var maxSpd = 0.8 |
3 |
else |
4 |
maxSpd = 1.1 |
5 |
if (shrink == 1) |
6 |
{ |
7 |
image_xscale -= lerp(0, image_xscale, 0.025) |
8 |
image_yscale -= lerp(0, image_yscale, 0.025) |
9 |
if (obj_puzzle_ice_cube_overworld_yellow.shrink == true) |
10 |
{ |
11 |
if (global.snowdin_flag[2] == 0) |
12 |
y += 0.4 |
13 |
if (global.snowdin_flag[2] == 1) |
14 |
y += 0.25 |
15 |
} |
16 |
if (image_xscale < 0.3) |
17 |
instance_destroy() |
18 |
} |
19 |
if (obj_puzzle_controller_overworld_yellow.active == false) |
20 |
{ |
21 |
image_speed = 0 |
22 |
return; |
23 |
} |
24 |
y += rollSpd |
25 |
if (sprite_index != spr_molten_rock_overworld_yellow || position_meeting(x, (y + 3), obj_puzzle_ice_cube_overworld_yellow)) |
26 |
{ |
27 |
rollSpd = 0 |
28 |
return; |
29 |
} |
30 |
if position_meeting(x, (y + 3), obj_puzzle_ice_cube_overworld_yellow) |
31 |
{ |
32 |
shrink = 1 |
33 |
rollSpd = 0 |
34 |
canRoll = 0 |
35 |
audio_stop_sound(snd_rock_roll) |
36 |
} |
37 |
if (canRoll == 1) |
38 |
{ |
39 |
if (rollSpd < maxSpd) |
40 |
rollSpd += 0.02 |
41 |
if (!audio_is_playing(snd_rock_roll)) |
42 |
audio_play_sound(snd_rock_roll, 1, 1) |
43 |
} |
44 |
else |
45 |
{ |
46 |
rollSpd = 0 |
47 |
if (shrink == 0 && instance_exists(obj_puzzle_ice_cube_overworld_yellow)) |
48 |
{ |
49 |
if (global.snowdin_flag[2] == 0) |
50 |
y = obj_puzzle_ice_cube_overworld_yellow.y - 28 |
51 |
if (global.snowdin_flag[2] == 1) |
52 |
y = obj_puzzle_ice_cube_overworld_yellow.y - 21 |
53 |
} |
54 |
audio_stop_sound(snd_rock_roll) |
55 |
} |
56 |
if (canAnimate == 1) |
57 |
{ |
58 |
if (rollSpd > 0) |
59 |
image_speed = rollSpd * 0.33 |
60 |
} |
61 |
else |
62 |
image_speed = 0 |