Displaying Decimal Values in a Text Label

I’m working on a game that uses decimal values for speed and altitude. I’d like to show these values above and below the counter so the players can keep track of ‘known’ attributes during play.

The dynamic property, when the number is marked as numeric, can only use integer values. I can use the integers for tracking, but I’d like to display the values as they would be used in the game. How do I divide the value (say $Speed$) by 10 and then show this to the player (i.e. display 4.5 as the speed below the counter - I can display fine, just not the decimal value)?

Thanks in advance


(Posted in the proper forum)

I may be wrong but I don’t think you can. You should be able to in the next major release of Vassal (v3.2) as it will contain a mathematics engine, so I’ve been hearing.

btw, what part of Nor Cal you from?

Thanks - thought that might be the case. I had seen other references to the next release for other math-related functions.

Any idea if you can associate a text value with a numeric value? I converted, for instance, the bank angles to be 1-6 where 1 would be level flight, 2 would be right bank, etc. Is there a way to equate these values where I can show what the bank is, not the number. I think I can do it with layers, but that would entail making six gifs (12 for the flight attitudes) and I’m having a problem with the layers rotating to match the orientation of the counter (i.e. they don’t - leading to strange looking piles of images).

I’m in the East Bay outside SF - just around the corner from you.


On Mar 11, 2010, at 9:03 AM, Casper wrote:

This is sensitive to the order of the layer and rotate traits.

Messages mailing list
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Yeah, Tar is right about that. You want to make sure your layer trait is listed above the rotation trait.