Align images through Script
by Tom Lenz · in Torque Game Builder · 10/08/2009 (3:45 pm) · 3 replies
Been looking for a while, but haven't come across anything yet.
What I'm looking for is a way to align multiple sprites along the edge of their bounding box. Something similar to what you can do in Word by aligning right or left.
The images are different sizes so I need a way to make sure the very left edge of the images are lined up.
Thanks in advanced.
What I'm looking for is a way to align multiple sprites along the edge of their bounding box. Something similar to what you can do in Word by aligning right or left.
The images are different sizes so I need a way to make sure the very left edge of the images are lined up.
Thanks in advanced.
Associate William Lee Sims
Machine Code Games
In that case, you get call getWidth() on the sprite, take half of it, and then subtract it from the X-coordinate you want to right-align with.