How do I label a sprite

Get help using Construct 2

Post » Tue Jul 04, 2017 8:01 pm

I have dynamically created sprites and I am using text objects to give them a label (ie one or two character numbers, such as 5 or 27). The problem is the text object needs to position to a different image point based on the size of the number in the text.

Or is there an easier way to label an image?
Posts: 7
Reputation: 239

Post » Tue Jul 04, 2017 9:46 pm


Maybe your text box is left aligned? If your text box is centered then it should appear always correctly if there is 1 digit or 2 digits.

Another possible solution you could use, since I don't know the specifics of your project, is to clone your sprite and have one sprite for digits 1 to 9 and a cloned sprite for digits 10 to 99.

And yet another possible solution is to, instead of spawning the text on the sprite, is to spawn the sprite behind the text which is correctly positioned.

Good luck
Thank you to Construct 2 for giving me the ability to create games without programming knowledge.
My games & gaming portal = DolyGames
If anyone wants to cooperate to help each other Win-Win please email me - I am always happy to discover new opportunities.
Posts: 97
Reputation: 2,479

Return to How do I....?

Who is online

Users browsing this forum: signaljacker and 8 guests