Automatically changing text

I want to make a text object displays the constantly changing angle of another object. Is there any way to wire the number in a value of an ExposeTM helper into the text of a Text Shape Object?

Thanks.

It’s scriptable, and there’s reference for how to do it in the maxscript help tutorials.

Cool! Thanks! I was just barely smart enough to modify the example in the tut to my needs -except… how can I kill the decimal places?

This is what I did:
TM=exposetm name:“ExposeAngle”
t=text name:“ControlledText”
t.baseobject.renderable=true
theCtrl = float_script()
theCtrl.addNode “TheText” t
theCtrl.addNode “ExposeAngle” TM
theCtrl.SetExpression “TheText.text = ExposeAngle.localEulerY as string\n0” decimal 0
t.kerning.controller=theCtrl

We need to cast the float to an integer, and display the integer.


theCtrl.SetExpression "TheText.text = ((ExposeAngle.localEulerY as integer) as string\n0" decimal 0

Suh-weet! Thanks! :smile: