Using ObjectId
by James Kennedy · in Torque X 2D · 09/17/2007 (3:38 pm) · 4 replies
Note: I don't have pro
I was trying to use ObjectId to store the id, then use it later to compare if an object is the same id, but I am finding that objectId changes as time progresses. Do objects have any other unique name/id that can be consumed in this way?
I was trying to use ObjectId to store the id, then use it later to compare if an object is the same id, but I am finding that objectId changes as time progresses. Do objects have any other unique name/id that can be consumed in this way?
About the author
#2
I am not setting objectid anywhere in my code.
09/18/2007 (2:18 pm)
Every time I access the objectid on a t2danimatedsprite it goes to the next highest available numberI am not setting objectid anywhere in my code.
#3
thanks for the help
09/18/2007 (7:31 pm)
Never mind the problem had nothing to do with objectid, it was just my codethanks for the help
#4
I'm glad you got it working. :)
Also, in case anyone is wondering, you can't actually modify the ObjectId without changing the source because the set method is internal.
Edit: I don't know why anyone would want to modify an ObjectId, just saying you can't with the binary version.
09/19/2007 (5:50 pm)
No problem.I'm glad you got it working. :)
Also, in case anyone is wondering, you can't actually modify the ObjectId without changing the source because the set method is internal.
Edit: I don't know why anyone would want to modify an ObjectId, just saying you can't with the binary version.
Torque Owner Thomas Buscaglia
That said, ObjectId shouldn't change once the object is registered. It should default to zero and get set to a unique number when the object becomes registered. I'm not seeing anything in the code that would even allow it to be changed.