forums

TNT Basic Forums > Programming Q&A
image width
< Last Thread     Next Thread >
Author
Thread        Post A Reply

12-18-2001 13:42

Posted by:
brett

Click Here to Email brett   Find more posts by brett

im making an energy bar and i want to just change the image width to represent the life remaining, but it wont work. here is part of my code:

sprite 11,10,10,24
life = image width(24,128)
draw frame

life is the variable that i am using to be the number of life left. what am i doing wrong?
thx
-brett

12-18-2001 16:19

Posted by:
John Treece-Birch

Find more posts by John Treece-Birch

Image Width

Image Width is a function that returns the width of an image, it cannot be used to set the width of asn image. Unfortuantely, there is currently no way to scale an image in TNT Basic. We are working on adding this functionality but it won't come for a while.

In the mean time you could try using a sequence of different images that get displayed as the player's life is depleted or draw a rectangle using the Fill Rect command width a width the size of the player's life.

Thanks,
John

12-18-2001 22:15

Posted by:
brett

Click Here to Email brett   Find more posts by brett

thx for ur help, i hope this feature gets added soon!

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.