Simple counter

Simple counter

Anonymous
Not applicable
354 Views
5 Replies
Message 1 of 6

Simple counter

Anonymous
Not applicable
Hi all,

I am creating a year counter from 1970 onwards (don't ask why :-). I have put the script:

$'Text01'.text = ((SliderTime as Integer)/100+1970) as String;
0

into the kerning of a text object. However this timer is too fast (1 year = 1 frame) is there a way of slowing this to say 1 year per 10.

Cheers

Luc
0 Likes
355 Views
5 Replies
Replies (5)
Message 2 of 6

Steve_Curley
Mentor
Mentor

st = SliderTime as integer / 160
-- 160 for 30 FPS, 192 for 24 FPS

if (mod st 10 == 0) do
$Text01.Text = ((st / 10) + 1970) as String

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 3 of 6

Anonymous
Not applicable
Cheers steve, nice one!
0 Likes
Message 4 of 6

Steve_Curley
Mentor
Mentor
You're welcome 🙂

(or you would be if could get this to post with a 1 line reply...)

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 5 of 6

Anonymous
Not applicable
Only thing is that it does not render the number changes, it stays stuck on the first date. I dont think it is updating. It does work on the viewport. wierd
0 Likes
Message 6 of 6

Anonymous
Not applicable
sorted it using currentTime.frame

Cheers
0 Likes