Skip to content

Can't connect signals to portrait script #2510

Answered by eVliin
M4Z3-R asked this question in Q&A
Discussion options

You must be logged in to vote

You can take a look at my code to see if yours is very different

func _ready() -> void:
	Dialogic.Text.about_to_show_text.connect(_about_to_show_text)
	Dialogic.Text.text_finished.connect(_text_finished)

func _about_to_show_text(info: Dictionary) -> void:
	"""
	Prepares character visuals when about to speak
	
	Args:
		info (Dictionary): Dialogic event data
	"""
	if is_character(info):
		_highlight()

func _highlight() -> void:
	"""Activates speaking state with mouth animation"""
	mouth.play("talk")

func _unhighlight() -> void:
	"""Returns to neutral state after speaking"""
	mouth.stop()
	mouth.frame = 0

func is_character(info: Dictionary) -> bool:
	"""
	Identifies if current character …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@eVliin
Comment options

@M4Z3-R
Comment options

@M4Z3-R
Comment options

@eVliin
Comment options

Answer selected by M4Z3-R
@M4Z3-R
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants