okay... I've used Love 2d. They use callbacks a lot so I get how that works.
That is the demo is looked at but I'm not familiar with moonscript, so I'm still a bit confused on how to actually feed the remap function data and such. Maybe something like this?
map(0,0,30,17,0,0,-1,remap(tile)
If tile == 1 and btn(4) then tile=2)
If map is drawing a 1 tile and the player presses z then change it to a 2 tile.
Is this right?