How to make reusable speech bubbles?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SebSharper

Hi guys, I am making a 2d pixel art game. And I was thinking about implementing some speech bubbles that should appear in front of either interactable objects (doors, chests…) or characters.

It should look like this , but I would require something simpler, instead of the character going out of the bubble, I’d use an icon centered in the bubble, but not bigger than it (same for text).
I have tried this instantiating my bubble scene, however, this always shows at the center of the screen and with a huge size (root node is a NinePatch).
How could I achieve something like this?

:bust_in_silhouette: Reply From: RazorSh4rk

Press V while hovering over the node in the editor to set the pivot point to the little triangle thing, and then set the speech bubble’s position to the player’s position.

So the triangle thing and the speech bubble are different nodes? Do I make the speech bubble a NinePatch and the triangle a TextureRect?

SebSharper | 2020-04-17 18:49

You can just use an image if you dont wanna resize it too much, but yeah, something along those lines.

RazorSh4rk | 2020-04-17 21:09

Is there any way to make it resize according to the children size?

SebSharper | 2020-04-18 02:09