text with sprite
by Jason Fermor · in Torque 2D Beginner · 05/19/2014 (11:53 am) · 3 replies
Hi, i have made a simple game but i am looking for a way to add text above a sprite and link them together so they move together.
for example i have a sprite of a car
i want above the sprite the text saying "Player 1"
and for the text to move with the sprite
how do i do this? thanks, Jason
for example i have a sprite of a car
i want above the sprite the text saying "Player 1"
and for the text to move with the sprite
how do i do this? thanks, Jason
#2
It's the bad way, but it's an option....
05/20/2014 (7:46 am)
The less cool way would be to incorporate the text in the sprite. It's less cool because you don't use physics joints and because it potentially increases your artwork resources exponentially - each player must have a "copy" of each player sprite option (if you can choose the color of your sprite, for instance).It's the bad way, but it's an option....
#3
05/21/2014 (8:50 am)
Thank you for your help. I have made it work :) thanks. Jason.
Associate Simon Love
Another, more complicated way to do it would be to create a GuiTextCtrl and an empty Sprite. You would then call
so that the Gui would adopt the size of MySprite as well as its position.
You would then simply link MySprite with your Car object with a joint.