Visual Ammo Count

How would one do a Halo assault-rifle style ammo counter, with a hundred or so bullet icons that dim when they’re used, but not have to have a hundred separate GOs to render?

Make a rendered animation, and save as a quicktime file, then in unity, cycle the frame of the quicktime to show ammo left. Though, not having played Halo, Im not sure of the exact look you are after.

Easiest way is probably to make a plane with a repeating (tiling) texture of the bullet. Just increase the horizontal scale of the object and the texture scale of the material the same amt. :slight_smile:

You could put one over the other and have the background (faded) one always at the max number of bullets and the top one change.

There may be a couple more details to work out, but that’s the gist of it. Plus, it could take 4 polygons, a relatively simple script, and one very small repeating texture. :slight_smile:

function updateBullets(numberOfBullets : float)
{
	transform.localScale.x = numberOfBullets;
	renderer.material.mainTextureScale = Vector2(numberOfBullets,1);
}

Something like that. You’ll probably want to make the origin of your plane be on the side you want to anchor so when it expands it expands in one direction.

Or, you could make a font, one character for the “avaialble” bullet and one for the “spent” bullet. Then just change the string as needed.

If you go this route I can whip up a TrueTupe font in a matter of minutes in Font Studio. All I’d need is the two small vector art pieces.

D

…Very clever, guys! I don’t need anything now (I was just wondering), but I’ll keep your suggestions—and offers, Davey!—in mind.