#ECS Sheduling Systems

1 messages · Page 1 of 1 (latest)

humble oar
#

Im getting diffrent outputs depending on how im sheduling my systems (im using jecs as my ecs)

First Shedule:

require(systems.user.spawnUser)

require(systems.user.deleteUser)

require(systems.datastore.loadData)

require(systems.test)

this prints the player getting added and removed (no currency).

Second Shedule:

require(systems.user.spawnUser)

require(systems.user.deleteUser)

require(systems.test)

require(systems.datastore.loadData)

This prints the currency and player getting removed (not added).

#

To print i use this:

world:set(tags.DataLoaded, jecs.OnAdd, function(entity)
    for entity, coins in world:query(pairs.UserdataTypes.testCoins) do
        if entity == entity then
            print(coins)
        end
    end
end)

world:set(tags.IsUser, jecs.OnAdd, function(entity)
    print("Added")
    print(name(entity))
end)

world:set(tags.IsUser, jecs.OnRemove, function(entity)
    print("Removed")
    print(name(entity))
end)
forest dagger
#

lowkeyuinley

#

i have no clue what im reading

wispy mica
fading bone
#

😭

humble oar
#

bro 😭

humble oar
wispy mica