Preventing Real Attribute from showing too many decimal digits
anshu.bishops.2001
Member Posts: 1
Hi!! I am beginner and developing my first basic game....
I have an real attribute that tracks the time taken for the actor to reach point B from point A.
and this is achieved by timer that adds 0.01 to the attribute every 0.01 seconds.
I use another actor to display this attribute on the screen..... For some seconds it works fine but after that it starts showing approx 10 decimal points which covers a large part of my screen. Is there any way of removing those decimals??
Or Is there a different way of tracking time??
Comments
round(attribute) will show no decimals. roundTo(attribute,decimals) will show the number you tell it to show, rounding up/down as needed. prec(attribute,decimals) will show the number of decimals you tell it to, just lopping off the remainder.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support