How to get propertys of a selected object?
by Prodigy Andy · in Torque Game Engine · 09/20/2007 (9:56 pm) · 5 replies
I can select objects now just followed what the thread WoW Player Control Emulation said.
But how can i get the propertys of the selected object? For example, I write some info into the "nameTag" of the object(StaticShape) , then how to get the "nameTag".
Thanks.
But how can i get the propertys of the selected object? For example, I write some info into the "nameTag" of the object(StaticShape) , then how to get the "nameTag".
Thanks.
#2
09/20/2007 (10:40 pm)
Yes, I have tried like you said. I just got a "null".
#3
new StaticShape(testname) {
canSaveDynamicFields = "1";
internalName = "internamenamefs";
position = "311.068 352.344 215.063";
rotation = "1 0 0 0";
scale = "1 1 1";
nameTag = "iamnametag1";
dataBlock = "Tree2StaticShape";
receiveSunLight = "1";
receiveLMLighting = "1";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "0 0 0 1";
useLightingOcclusion = "1";
};
09/20/2007 (10:45 pm)
Here is my StaticShape in mission file:new StaticShape(testname) {
canSaveDynamicFields = "1";
internalName = "internamenamefs";
position = "311.068 352.344 215.063";
rotation = "1 0 0 0";
scale = "1 1 1";
nameTag = "iamnametag1";
dataBlock = "Tree2StaticShape";
receiveSunLight = "1";
receiveLMLighting = "1";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "0 0 0 1";
useLightingOcclusion = "1";
};
#4
the field must be ghosted as part of packUpdate()/unpackUpdate().
ie, when an object is declared in the mission file, that's server-side,
and not all fields are transmitted to the client.
nameTag might be one of those fields.
check TDN for "ghosting" and "packupdate".
09/20/2007 (11:46 pm)
If you are trying to read the value of a field on the client instance of the object,the field must be ghosted as part of packUpdate()/unpackUpdate().
ie, when an object is declared in the mission file, that's server-side,
and not all fields are transmitted to the client.
nameTag might be one of those fields.
check TDN for "ghosting" and "packupdate".
Torque 3D Owner Aun Taraseina
Aun.