[Closed] how do i get a variable to represent ticks
I have a script reading a text file then it animates objects using that data
Working with frames this script works fine
But I need my variable T1 to represent ticks not frames.
I have the time configuration set to MM:SS: TICKS
[color=lemonchiffon]T1 = click*ppq/4800 – Ppq=anything from 96 to 2082 – Click=anything from 0 to 9999999 [/color]
[color=lemonchiffon][/color]
[color=blue][color=cyan]at[/color] [color=lemonchiffon]time T1 rotate theObj rot_key – rotate object at tick T1[/color][/color]
How do I get T1 to represent Ticks? right now it sets frames I have read the help files but cant quite work out the answer
Thanks for Reading
at time (execute(T1 as string + “t”)) rotate theObj rot_key
I think that what you’re trying to do. If you just give “at time” a number it’s going to assume that it’s a frame value.
Hope it helps.
Some simple time conversion rules without using Execute:
Integer to Frames:
theValue = 100
theValue as time –> 100f
Float to Frames:
theValue = 100.5
theValue as time –> 100.5f
Integer to Frames to Ticks:
theValue = 100
(theValue as time) as integer –> 16000 (when TicksPerFrame is 160 @ 30 fps)
–alternatively:
theValue*TicksPerFrame –> 16000
Full Frames to Float
theFrames = 100f
theFrames.frame –> 100.0
Float Frames to Float
theFrames = 100.5f
theFrames.frame –> 100.5
Float Frames to Ticks
theFrames = 100.5f
theFrames as float –> 16080.0 (because 80 ticks are 1/2 frame @160 ticks per frame)
Frames To Integer
theFrames = 100f
theFrames.frame as integer –> 100
Ticks To Integer
theTicks = 16000
theTicks/TicksPerFrame –> 100 (assuming TicksPerFrame == 160 @ 30 fps)