1 |
function cutscene_action_sprite() //gml_Script_cutscene_action_sprite |
2 |
{ |
3 |
with (argument[0]) |
4 |
{ |
5 |
if (sprite_index != argument[1] || image_speed == 0) |
6 |
{ |
7 |
sprite_index = argument[1] |
8 |
image_speed = argument[2] |
9 |
image_index = 0 |
10 |
} |
11 |
else |
12 |
{ |
13 |
if (image_index >= (image_number - 1)) |
14 |
{ |
15 |
if (argument[3] == false) |
16 |
{ |
17 |
image_speed = 0 |
18 |
with (other) |
19 |
cutscene_advance() |
20 |
return true; |
21 |
} |
22 |
else |
23 |
{ |
24 |
if (argument_count > 4) |
25 |
image_speed = argument[4] |
26 |
image_index = image_number - 1 |
27 |
with (other) |
28 |
cutscene_advance() |
29 |
return true; |
30 |
} |
31 |
} |
32 |
if (argument_count > 5) |
33 |
{ |
34 |
if (argument[6] >= (image_index - image_speed) && argument[6] <= (image_index + image_speed)) |
35 |
{ |
36 |
if (!audio_is_playing(argument[5])) |
37 |
audio_play_sound(argument[5], 1, 0) |
38 |
} |
39 |
} |
40 |
} |
41 |
} |
42 |
return false; |
43 |
} |