You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems fairly crazy that we can iterate the core to get basic information about the id, type, etc of each element (using getElementIdList(), getElementNameById, ...), but we can't get the actual element objects that way. We have to link them, then access the named variables connected with each link. If we want to iterate all linked elements, we have to build our own table and write manual code to add the elements to it.
That doesn't make a lot of sense!
I would suggest deprecating most of the existing API, and just having two element related methods:
getElementIdList() -- return a list of the ids of all elements in this core
getElementById(uid) -- return the element object for the given element
All other properties can then be read from the existing element API:
getElementClass()
getHitPoints()
getMaxHitPoints()
getMass()
etc...
A few element API additions would be good:
getName()
setName(newName)
getSize() -- return the size (xs, s, m, l, xl)
getPosition() -- position in construct local coordinates
getOrientation() -- orientation in construct local coordinates
The text was updated successfully, but these errors were encountered:
That's a great post, thanks. I attempted to get us doing something similar last year, but it didn't really get much traction!
I am pleased to hear that Deckard says they have plans in that direction, though I'm worried that (a) I might not still be playing by the time they come to fruition, and (b) the game might not make it that far.
I can confirm you that, that kind of change is planed and in progress.
We're thinking about which approach could be the best on that. However it will come anyway on linked elements too, to get data like getName for the example.
(originally posted here)
It seems fairly crazy that we can iterate the core to get basic information about the id, type, etc of each element (using
getElementIdList()
,getElementNameById
, ...), but we can't get the actual element objects that way. We have to link them, then access the named variables connected with each link. If we want to iterate all linked elements, we have to build our own table and write manual code to add the elements to it.That doesn't make a lot of sense!
I would suggest deprecating most of the existing API, and just having two element related methods:
All other properties can then be read from the existing element API:
etc...
A few element API additions would be good:
The text was updated successfully, but these errors were encountered: