Question about jecs

Very simple question, I’m trying to figure out when a component is changed to update a loop using jecs, I was trying to use

jecs.OnChange()

but it didn’t work. When I used

print(jecs.OnChange())

it printed 259 which i think is an id?? (not sure)

If anybody could explain what it does and can find a solution to my problem i would be grateful.

I’ve never used jecs but looking at the documentation, it seems like you need to do something like this instead?

world:set(Component, OnChange, function(entity, id, data)
    -- A component `id` has been changed to `data` on `entity`
end)
1 Like

yeah that seems to work for my situation, not a lot of videos n stuff on jecs, so its harder to understand for me, thanks for the solution though!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.