Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
Hi, I have a status bar whose texture I would like to cut in half, preserving the right side, but keeping the right side anchored to the right side of a background texture I have, similar to a reverse filling of a status bar. However, no matter what attempts I make, it always takes the right side of the image and stretches it over the left side, or moves it around. Any ideas?
We'd need to see the code. A simple example is:
Edited by Ro on 12/8/2012 10:49 PM PST
Is an image of what I have already coded. The frame on the left is finished, as a status bar that operates under the unit health event with a plaer conditional. The one on the right is giving me problems. See how the angle on the right side of the frame is squished, while the background texture isnt? I've been looking for a way to just shear off a percentage of the overlay frame while preserving that angle. Is that possible?
My initial code for editing the frame goes something like:
and when the percentage is o.3, it gives the picture linked above.
edit: Figured it out (i think).
Edited by Arazon on 12/9/2012 1:38 AM PST
But when I do that, I use these input values, and get this result- it's rather confusing.
Imagine your health dips to 90%, or 0.9. In that case, the left coordinate should move back by a factor of 0.1, and the width should be 0.9* whatever the original width was.
It appears as if my width of my textures are actually larger than what they appear, and the extra part is not showing...the arrow is anchored to the end of my overlay texture (grey) and when it's resting at 0, 0 in the upper left hand corner it extends 40 pixels out, I have to set its point in 40 to make it line up.
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.