Counter

Download here.

Screenshots

History

I've wanted to display the value of variables for a very long time. At first I wanted to display the damage inflicted by the impact of a weapon, but the ability to make a number appear has many other applications, especially for modders. This counter works for floating point values from -9999 to 9999. It will also display numbers outside of that range, but they will be cut off at four digits. The most significant digit of the number is displayed in red, in case you get turned around while trying to read the number. (Stupid 3d environments! 2d is so much easier!)

Instructions

Unzip counter.zip into your Homeworld directory. Open general.script and add this line at the top:

LoadEffect		counter.ebg

Now you can use counter.ebg in any other effect. For example, to see how much damage a weapon does, open a hitEvent and add this to the startup() section

spawn(counter.ebg, damage)

The variable damage is defined in the hitEvent, so that value is passsed to the counter, which prints that value in space. The number default to 20m tall, but you can change this if it is unsatisfactory. Pass a second parameter to counter.ebg to control the height of the letters, like this:

spawn(counter.ebg,damage, 50.0)

That makes the numbers 50m tall. Notice that I entered "50.0" and not "50" This ensures that the number is passed as a floating-point number, not as an integer. If the second parameter is an integer, you won't see the numbers at all.