Discord
Login
Community
DARK THEME

is there a way to change map cells from the code

for example if I want to change the sprite in the bottom right corner to stone or something

init = function()
  myMap = new Map( 100, 100, 5, 20 )
  maps['myMap'] = myMap
end

update = function()
  myMap.set( random.nextInt( myMap.width), random.nextInt( myMap.height ), "icon")
  print( system.fps )
end

draw = function()
  screen.drawMap(myMap, 0 , 0, screen.width, screen.height )
end

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community