1 |
function scr_text_talkersscr_text_talkersfunction scr_text_talkers() //gml_Script_scr_text_talkers
{
var talker_enabled = false
for (var i = 0; i < array_length(talker); i++)
{
if (talker[i] != noone)
talker_enabled = true
}
if talker_enabled
{
if (message_current < array_length_1d(talker))
{
talker_current = message_current
if (talker[talker_current] == obj_quote_battle_ceroba_outro_4 && talker_current > 0)
talker[talker_current] = talker[(talker_current - 1)]
}
if (talker_current > 0)
{
with (talker[(talker_current - 1)])
is_talking = false
}
var talking_npc = talker[talker_current]
with (obj_npc_parent)
{
if ((id != talking_npc && is_talking == true) || global.dialogue_open == false)
is_talking = false
}
if (talker[talker_current] != noone)
{
with (talking_npc)
is_talking = true
}
if (object_is_ancestor(talker[talker_current], obj_npc_parent) && talker[talker_current].npc_voice_sfx != 0)
sndfnt_array[talker_current] = talker[talker_current].npc_voice_sfx
}
} () //gml_Script_scr_text_talkers |
2 |
{ |
3 |
var talker_enabled = false |
4 |
for (var i = 0; i < array_length(talker); i++) |
5 |
{ |
6 |
if (talker[i] != noone) |
7 |
talker_enabled = true |
8 |
} |
9 |
if talker_enabled |
10 |
{ |
11 |
if (message_current < array_length_1d(talker)) |
12 |
{ |
13 |
talker_current = message_current |
14 |
if (talker[talker_current] == obj_quote_battle_ceroba_outro_4 && talker_current > 0) |
15 |
talker[talker_current] = talker[(talker_current - 1)] |
16 |
} |
17 |
if (talker_current > 0) |
18 |
{ |
19 |
with (talker[(talker_current - 1)]) |
20 |
is_talking = false |
21 |
} |
22 |
var talking_npc = talker[talker_current] |
23 |
with (obj_npc_parent) |
24 |
{ |
25 |
if ((id != talking_npc && is_talking == true) || global.dialogue_open == false) |
26 |
is_talking = false |
27 |
} |
28 |
if (talker[talker_current] != noone) |
29 |
{ |
30 |
with (talking_npc) |
31 |
is_talking = true |
32 |
} |
33 |
if (object_is_ancestor(talker[talker_current], obj_npc_parent) && talker[talker_current].npc_voice_sfx != 0) |
34 |
sndfnt_array[talker_current] = talker[talker_current].npc_voice_sfx |
35 |
} |
36 |
} |