Game Development Community

SimObject::inspectPostApply() In TGEA 1.8

by Anthony Merlo · in Torque Game Engine Advanced · 02/02/2009 (9:58 am) · 3 replies

Can someone explain how to use this in TGEA 1.8? Or how to do the same thing that this does in 1.8?

I'm changing the ambient light value on an object and the appearance isn't updating. But if I go into the inspector I can confirm the value has changed, and if I uncheck then recheck use ambient lighting then it does update appearance.

Here is the code I'm using to change the field values.

%object.setFieldValue(customAmbientLighting, "9 9 0 9");
%object.setFieldValue(useCustomAmbientLighting, true);

#1
02/02/2009 (10:39 am)
What type of object is it?
#2
02/02/2009 (10:42 am)
My test object is a tree. It's a Static or a StaticTS. Not sure how to tell which.
#3
02/02/2009 (12:04 pm)
Ok - it's a TSStatic. Are you doing this in a server script? If so, you will need to resend the data back to the client. Open TsStatic.cpp, and add the following function down at the bottom:

ConsoleMethod(TSStatic, Update, void, 2, 2, "")
{
   object->inspectPostApply();
}

And recompile.

Then in script you call it:

%object.Update();

If you're doing this from a client script, it should update automtacally...