Posted: Tue Oct 08, 2024 8:02 am Post subject: Grouping Addresses
Is there a way to automate the creation of a miniature entity structure?
Code:
for i = 0, 10 do
local group = getAddressList().createMemoryRecord()
group.IsGroupHeader = true
--create an entity under this group
local entry = getAddressList().createMemoryRecord()
entry.description = "Entity #"..i
entry.address = "address_get_entity"
entry.OffsetCount = 1
entry.Offset[0] = 4 * i
entry.type = 2
end
You should probably move the header outside the for loop
Use one of the constants in defines.lua for the type
The group can be set to hide children when inactive as well
Code:
local group = getAddressList().createMemoryRecord()
group.Description = 'Entities'
group.IsGroupHeader = true
group.Options = '[moHideChildren]'
for i = 0, 10 do
local entry = getAddressList().createMemoryRecord()
entry.description = "Entity #"..i
entry.address = "address_get_entity"
entry.OffsetCount = 1
entry.Offset[0] = 4 * i
entry.type = vtDword
entry.appendToEntry(group)
end
_________________
I don't know where I'm going, but I'll figure it out when I get there.
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