Hello Jerrylu,
Natively I don't think it's possible but you can certainly get it to work using Visual Logic or scripting.
You would then create a dummy text object which is invisible in your scene, but where you could use the textvalue inside visual logic to select the correct material or you could use a little script in the scene to set the material based on the name you have entered in your textobject.
In scripting the code would be something like:
dim objToChangeMaterial as xpBaseObject
dim txtObj as xpTextObject
dim mat as xpMaterial
' LINK THE OBJECTS IN THE SCENE
Scene.GetObjectByName("[the_name_of_your_dummy_text_object]", txtObj)
Scene.GetObjectByName("[the_name_of_the_object_you_want_to_change_the_material_of]", objToChangeMaterial)
' GET THE MATERIAL YOU WOULD LIKE TO USE
engine.getMaterialByName(txtObj, mat)
' SET THE MATERIAL ON THE OBJECT YOU WANT TO CHANGE THE MATERIAL OF
objToChangeMaterial.setMaterial(0, mat)
That should do it.
I'm writing this out of the top of my head so I haven't tested this but I think it should work.
You could copy this code into the OnOnline tab of the Scene script page.
In Visual Logic you would have to use some comparisons to check whether or not it is found in some predefined values that you have defined which would make it a bit complicated and less dynamic. But it's up tp you.
Cheers,
Kenneth
#XPression