(05-09-2013, 05:33 PM)keyboard Wrote: [...]so we can prevent entities from landing inside a block in the first place.You really can't - the player can place a block into a place where a pickup is, and the server needs to deal with it.
It might be easier to write a function that would return the nearest "available" space, and direct the entity towards it. Using NY-metric for "nearest" should be sufficient, to make the search algorithm easier.
(05-09-2013, 07:01 PM)STR_Warrior Wrote: how to spawn pickups[...]?In C++ we have the cWorld::SpawnItemPickups() functions; they are not exported into Lua API, not sure why. I think they should work out of the box. Try auto-exporting them to API and use them.
Exporting is done by putting
Code:
// tolua_begin
Code:
// tolua_end