diff --git a/addons/dialogic/Modules/Character/subsystem_containers.gd b/addons/dialogic/Modules/Character/subsystem_containers.gd index fb13ea1bb..a129d52ae 100644 --- a/addons/dialogic/Modules/Character/subsystem_containers.gd +++ b/addons/dialogic/Modules/Character/subsystem_containers.gd @@ -45,11 +45,11 @@ func add_container(position_id: String, position := "", size := "") -> DialogicN if example_position: var new_position := DialogicNode_PortraitContainer.new() example_position.get_parent().add_child(new_position) + new_position.name = "Portrait_"+position_id.validate_node_name() new_position.size = str_to_vector(size) copy_container_setup(example_position, new_position) new_position.container_ids = [position_id] new_position.position = str_to_vector(position)-new_position._get_origin_position() - new_position.name = "Portrait_"+position_id.validate_node_name() position_changed.emit({&'change':'added', &'container_node':new_position, &'position_id':position_id}) return new_position return null diff --git a/addons/dialogic/Modules/Character/subsystem_portraits.gd b/addons/dialogic/Modules/Character/subsystem_portraits.gd index 7033aba9e..b7377be89 100644 --- a/addons/dialogic/Modules/Character/subsystem_portraits.gd +++ b/addons/dialogic/Modules/Character/subsystem_portraits.gd @@ -254,6 +254,8 @@ func _animate_node(node: Node, animation_path: String, length: float, repeats := ## Moves the given portrait to the given container. func _move_character(character_node: Node2D, transform:="", time := 0.0, easing:= Tween.EASE_IN_OUT, trans:= Tween.TRANS_SINE) -> void: var tween := character_node.create_tween().set_ease(easing).set_trans(trans).set_parallel() + if time == 0: + tween = null var container: DialogicNode_PortraitContainer = character_node.get_parent() dialogic.PortraitContainers.move_container(container, transform, tween, time) @@ -563,6 +565,7 @@ func remove_character(character: DialogicCharacter) -> void: if is_instance_valid(character_node) and character_node is Node: var container := character_node.get_parent() + container.get_parent().remove_child(container) container.queue_free() character_node.queue_free() character_left.emit({'character': character})