Jump to content

Recommended Posts

Posted (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 by Jos
Posted (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 by Jos
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...