Thread: Food Bar
View Single Post
  #14  
Old 08-21-2005, 04:00 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
There are multiple ways to do it. You could have the food value have a max of 100 and a min of 1. Then you just do something like:

changeimgpart index,0,0,foodvalue,10;

Which would make the food bar display from an x of 0 to an x of whatever your food value is... like if it were 50, it would display from 0 to 50, which would be half the bar, if your bar was 100 pixels in width.

Otherwise you're going to need a small formula to adjust for the difference in pixel width to food value.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote