Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | momentanius |
Greetings! Good to see you all, folks.
So, I’m still starting with Game Design in general, and I’ve chosen to learn Godot (I’ve been using it for ~2 months or so now, and I’m having a blast), but I’ve hit a brick wall:
I’m trying to show a label whenever my character enters an area2D that is part of a specific group (Let’s call it “interactable”).
So:
Here is Miller, chilling in front of this knife.
IF MILLER ENTERS THIS AREA2D (that makes part of the “Interactable” group, I’d like to make a label with an “!” appear (with .show()).
I know I could use something like:
"func _on_KnifeInteract_body_entered(body):
> $Player.notification.show()"
Where notification is a label (or image) with the ! symbol.
But I’d end up replicating a lot of code (for every interactable object I would end up using this, and that’s not cool!)
I’m wondering on how should I approach this.
Thanks in advance!