Dazzler Posted October 12, 2011 Share Posted October 12, 2011 (edited) People, I am designing a graphic to show the current health of a player for a game. I have 2 equally sized jpgs: a skull and a helmet. As the player's health lessens so more skull is shown and less helmet; vica versa. So if health is 50%; we get the left half of the helmet and the right half of the skull. Therein lies the problem. If I leave the width and height values of guictrlcreatepic as 0, the picture is not resized--this is excellent: however, the pic on the right will only show the right half--I need the left half. Is there a way of right aligning a jpg? See attached. Ideally I simply increment one picture width and decrement the other. I could just have a series of jpgs showing the series of 100% helmet/0% skull to 0%helmet/100% skull but where's the coding challenge in that. Edited October 12, 2011 by Jos Link to comment Share on other sites More sharing options...
javasqlrpg Posted October 12, 2011 Share Posted October 12, 2011 (edited) This could be done with setpos. have a look at the following code, it will give you a general idea of how you could do it. Same counts for you... Read our rules! Jos Edited October 12, 2011 by Jos Link to comment Share on other sites More sharing options...
Developers Jos Posted October 12, 2011 Developers Share Posted October 12, 2011 (edited) Pls read the forum rules Edited October 12, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts