Closed 69sinisterblade69 closed 1 year ago
local x = 100
local y = 100
graphics.draw_text_2D("stacks", 14, x, y - 24, 0xFFFFFFFF)
graphics.draw_text_2D("counter", 14, x + 50, y - 24, 0xFFFFFFFF)
graphics.draw_text_2D("startTime", 14, x + 100, y - 24, 0xFFFFFFFF)
graphics.draw_text_2D("buff", 14, x + 300, y - 24, 0xFFFFFFFF)
local buff_keys = player.buff.keys
for i = 1, buff_keys.n do
local buff_key = buff_keys[i]
local buff = player.buff[buff_key]
graphics.draw_text_2D(tostring(buff.stacks), 14, x, y, 0xFFFFFFFF)
graphics.draw_text_2D(tostring(buff.stacks2), 14, x + 50, y, 0xFFFFFFFF)
graphics.draw_text_2D(tostring(buff.startTime), 14, x + 100, y, 0xFFFFFFFF)
graphics.draw_text_2D(tostring(buff.name), 14, x + 300, y, 0xFFFFFFFF)
if string.find(buff.name, 'charge') then
--print(buff.name)
end
y = y + 24
end
How to check all buffs of object? Documentation says to not use buffManager in favor of obj.buff, but I don't see any way to do that. What's the correct way to do something like that?