showProgressBar(which Graphic, bar brightness, x pos, y pos, length of bar, height of bar)
Draws a progress bar / health bar over the currently playing video.
Video must have the allowBar bit enabled for the progress bar to be visible.
showProgressBar(4, 3, 12, 26, 50, 4);
Uses graphic object #4, at a brightness of 3, with an upper left corner of x12, y26, going 50 pixels to the right, and 4 pixels down.
showProgressBar(0, 15, 0, 0, 128, 32);
Fills the entire display with a progress bar at brightness 15
Up to 8 graphic objects can be displayed at a time. You can combine progress bars to achieve shading effects.
showProgressBar(0, 5, 0, 28, 128, 4); showProgressBar(1, 15, 0, 29, 128, 2);
Object #0 is a bar with a brightness of 5 that is 128 wide and 4 tall at the bottom of the screen. Object #1 is a bar with a brightness of 15 that is 128 wide and 2 tall that starts one pixel below the first bar. This will give the effect of a bar with a shaded center.
video('B', 'A', 'A', allowBar | allowSmall | preventRestart, 0, 250); showProgressBar(4, 3, 12, 26, barProgress[player] * 4, 4); showProgressBar(5, 10, 12, 27, barProgress[player] * 4, 2);
The above plays a video that allows a bar, small numbers and won't restart itself. Then, two shaded of progress bars are drawn on top of it.
Numbers placed on the display are considered graphic objects as well. If you create a number as object 0, then a progress bar as object 0, it will overrite the previous object 0.
Therefore it's a good idea to keep them separated - I use objects 0-3 as numbers, and 4-6 as progress bars. You might have a situation where a timer is on the corners of the screen, and a progress bar randomly appears. If they use the same object #, you'll only see one or the other.
Worse, if a persistent timer is on Object 0, and you accidentally overwrite it with a progress bar, you may not see the updated timer numbers!