I’m trying to use a lua module for procedural tilemap generation. I’m using parts of the random walker code that Britzl made.
The problem is I can’t figure out how to access the tilemap from the lua module.
I have a collection with a GO, a tilemap and a script. I create the collection from a collection proxy.
The defold script can access the tilemap by url ("#city"). But the lua module can’t.
Trying to do tilemap.get_bounds("#city") gives me an error:
attempt to call field 'get_bounds' (a nil value)
The same call works fine from the defold script.
How do I get the url or id to use from the lua module?