From what I’ve been reading, if you need to constantly refer to the parameter of an object ([lua]obj.x[/lua]), it’s good practice to assign that to a local var ([lua]local objX = obj.x[/lua]) and use that instead.
However, what about an item within a table? ([lua]objects[i].x[/lua])
Is it better to index the object, or index the object’s property?
for example:
[lua]local obj = objects[i]
somevar = obj.x[/lua]
or
[lua]local objX = objects[i].x
somevar = objX [/lua] [import]uid: 49447 topic_id: 17501 reply_id: 317501[/import]
[import]uid: 3826 topic_id: 17501 reply_id: 66443[/import]