Posted: Sun Sep 15, 2024 6:11 am Post subject: Freezing element indexes in structures when updating offsets
Hi all,
CELUA.TXT says:
Code:
getElement(index): Returns a structureElement object (Changing offsets can change the index)
I want to adjust the offset of each element in the structure with a fixed offset programmatically.
I do this with a 'for' loop iterating through each element - getElement(i).
How do I freeze the indexes so I can make sure I apply the offset change to each element once and only once?
Thank you!
PS.
I might be going on about this wrong with a 'for' loop, please let me know if there's a better alternative.
An internal ChangeOffsets() member would be best that does it quickly as there may be quite a lot of members, some even with the same offset.
Thank you!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum