1 |
if instance_exists(obj_dialogue_shop_parent) |
2 |
var action = obj_dialogue_shop_parent.action[obj_dialogue_shop_parent.message_current] |
3 |
else |
4 |
action = "Nothing" |
5 |
if (action != "Override") |
6 |
{ |
7 |
if (instance_exists(obj_dialogue_shop_parent) && variable_instance_exists(2078, "portrait_alt") && array_length(obj_dialogue_shop_parent.portrait_alt) >= obj_dialogue_shop_parent.message_current) |
8 |
{ |
9 |
if (sprite_index != obj_dialogue_shop_parent.portrait_alt[obj_dialogue_shop_parent.message_current]) |
10 |
sprite_index = obj_dialogue_shop_parent.portrait_alt[obj_dialogue_shop_parent.message_current] |
11 |
} |
12 |
else |
13 |
sprite_index = full_sprite |
14 |
if (instance_exists(obj_dialogue_shop_parent) && obj_dialogue_shop_parent.point[obj_dialogue_shop_parent.message_current] == 1 && sprite_index == spr_hotel_shop_puppet_talk) |
15 |
{ |
16 |
if (obj_dialogue_shop_parent.can_talk == true && obj_dialogue_shop_parent.characters > string_length(obj_dialogue_shop_parent.message[obj_dialogue_shop_parent.message_current])) |
17 |
{ |
18 |
var new_sprite = shopkeeper_sprite[clamp(obj_dialogue_shop_parent.message_current, 0, (array_length(shopkeeper_sprite) - 1))] |
19 |
if (new_sprite == spr_collisionbox) |
20 |
new_sprite = shopkeeper_sprite[0] |
21 |
obj_hotel_shop_head.sprite_index = new_sprite |
22 |
image_speed = 1 |
23 |
} |
24 |
else |
25 |
{ |
26 |
image_speed = 0 |
27 |
image_index = 0 |
28 |
obj_hotel_shop_head.sprite_index = shopkeeper_sprite_default |
29 |
} |
30 |
} |
31 |
else |
32 |
{ |
33 |
can_talk_no_loop = false |
34 |
image_speed = 0 |
35 |
image_index = 0 |
36 |
} |
37 |
} |