| 1 |
var action; |
| 2 |
if (instance_exists(obj_dialogue_shop_parent)) |
| 3 |
action = obj_dialogue_shop_parent.action[obj_dialogue_shop_parent.message_current]; |
| 4 |
else |
| 5 |
action = "Nothing"; |
| 6 |
if (action != "Override") |
| 7 |
{ |
| 8 |
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) |
| 9 |
{ |
| 10 |
if (sprite_index != obj_dialogue_shop_parent.portrait_alt[obj_dialogue_shop_parent.message_current]) |
| 11 |
sprite_index = obj_dialogue_shop_parent.portrait_alt[obj_dialogue_shop_parent.message_current]; |
| 12 |
} |
| 13 |
else |
| 14 |
{ |
| 15 |
sprite_index = full_sprite; |
| 16 |
} |
| 17 |
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) |
| 18 |
{ |
| 19 |
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])) |
| 20 |
{ |
| 21 |
var new_sprite = shopkeeper_sprite[clamp(obj_dialogue_shop_parent.message_current, 0, array_length(shopkeeper_sprite) - 1)]; |
| 22 |
if (new_sprite == 0) |
| 23 |
new_sprite = shopkeeper_sprite[0]; |
| 24 |
obj_hotel_shop_head.sprite_index = new_sprite; |
| 25 |
image_speed = 1; |
| 26 |
} |
| 27 |
else |
| 28 |
{ |
| 29 |
image_speed = 0; |
| 30 |
image_index = 0; |
| 31 |
obj_hotel_shop_head.sprite_index = shopkeeper_sprite_default; |
| 32 |
} |
| 33 |
} |
| 34 |
else |
| 35 |
{ |
| 36 |
can_talk_no_loop = false; |
| 37 |
image_speed = 0; |
| 38 |
image_index = 0; |
| 39 |
} |
| 40 |
} |