[Closed] MaxScript Displayable Stopwatch
Would there be a simple way to make a “stopwatch” that will update a text object as a counter? To put timecode or MIN:SEC type stuff onscreen.
maybe something like this ?
http://maxplugins.de/max4.php?search=time
look for Cuneyt Ozdas’ Counter Text
Counter Text has some formatting issues. It only lets you show max time. I’d like to be able to set an arbitrary start time and have it count in either direction.
yeah i figured as much. I had problems with it myself.
there IS an example for a counter, but that’s way to complex for my liking [uses expressions]
i know magicm has a script involving ‘animated’ text, i’ll ask him to have a look here, don’t sit on it tho, this week has been a nightmare for the both of us at work [WAY tight deadlines], so give the fellah some time
Check out this link from cgcharacter.com
http://www.cgcharacter.com/dino2.htm
I think the use of the Ambient Controller may apply to your problem. I’ve quoted the passage you may find most useful below.
“The third one is real hard as Max does not provide this event message!!! However I worked out a little trick a few years ago to get around this
It turns out that the Ambient Light controller is evaluated during rendering each frame before geometry set-up. So what I do is make the Ambient Light controller a list controller (so you can still set the Ambient Light normally) with the second controller a float_script() controller called “System_Script_trigger”. In this script you will add a call to any scripts you want rendered once per frame before geometry set-up
it is effectively generating the system event you need that the Max API does not provide. Here is the single line you have to add to trigger our Neck_control script:”
Script a function to edit text object and put in the ambient controller…
Good Luck
Keith Morrison
Counter Text has some formatting issues. It only lets you show max time. I’d like to be able to set an arbitrary start time and have it count in either direction
😮 That’s wrong!!!
Actually the max time support was not present in th first version, added afterwards. The clock samples in the zip uses max time, but that’s not the only alternative.
Here is a sample file which uses “again max time in seconds” but modifies it. also there are 2 more counter texts bint to sliders. you can simply animate the slider parameter. Keeping the speed at zero the big time will show the animated offset value only. http://www.cuneytozdas.com/temp/counter_sample_max4.zip
Lots of things are possible: Just use simple parameter wirings, expression or script controllers on User Count.
:wavey:
Hi everyone, I’m reviving this topic becuase I need to use the trick solution Kramsurfer told us about.
The link to the workaround isn’t available anymore. Can anyone help me by explaining how this trick works? and also… some sample code would be very helpful to me.
I am very new to MAXscript, so I’d really appreciate any help.
In detail. I’m a newbie and therefore need to know exactly how to:
[ul]
[li]make the Ambient Light controller a list controller with the second controller a float_script() controller called “System_Script_trigger”.
[/li][li]In this script you will add a call to any scripts you want rendered once per frame before geometry set-up
[/li][/ul]
WOW! it works!
I have no idea how a newb like me managed it, but I actually figured it all out from that paragraph above. Sure took some time though.
I figured out I could:
View dopesheet > assign list controller to ambient lights > assign float script to weight1.
in the float script I put:
function()
0
I hope that helps anyone else who is interested. I now know much more about MAX than I ever intended to! arrrg!