Godot Version
4.4
Question
How do I make diferent msgs appear whern interacting with diferent objects?
I have this script for interactable objects but I want to make diferent interactable objects that show diferent msgs and not always the same so I duped the script but now when I try to change the script it says I have “clasas_name Interactable” duped. How do I fix this? Im pretty new to coding sorry
extends CollisionObject3D
class_name Interactable
signal interacted(body)
@export var prompt_message = "Interact"
func interact(body):
interacted.emit(body)
func _on_interacted(body):
$AudioStreamPlayer3D.play()
$"../Control/Label".visible = true
await get_tree().create_timer(1).timeout
$"../Control/Label".visible = false