lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




> The whole idea seems to be ok, but how do you manage querying
> information from other entities???

This is why I wanted to have a shared space, because I will need an array in lua holding all created entities (well the part of the entity created in lua).
And if an entity needs to access another entity it will be requesting it from this array.

Buy the way there's an option that I think is very bad and is getting
the instance from the C++ side, because each entity has its lua_state, I can expose a function to lua to query the entity manager and do something like:
GetEntity("name"); and this should be returning the lua data from the other entity (have to check how to do it, it is just an idea).

If you could explain how you achieved to solve this problem I would be really greatefull.


Thanks in advance,
HexDump.


Express yourself instantly with MSN Messenger! MSN Messenger