Skip to content

Manipulating tiles #116

@Quedex

Description

@Quedex

I'm just getting started with Moai and I was really excited to discover the RapaNui framework. (This will definitely make it easier to convert my Corona project to Moai.)

But unfortunately, due to the lack of, or limited amount of documentation, I'm afraid I've hit a bump in the road. I've searched the examples and sdk for information with no luck.

So if anyone would be kind enough to help me with, or answer some questions regarding the map module, I'd really appreciate it.

  1. Is there a way to remove a tile from, or add a tile to a layer?
  2. Is there a way to change a tile on a layer from one tile (gid) to another?
  3. Is there a way to move a tile from one position to another?
  4. Is there a way to animate tiles?
  5. Is there a way to change the properties (both key and value) of a specific tile on a layer?

I tried to come up with a workaround by using "groundLayer.tiles[(row * groundLayer.width) + col] = 10" to change a tile but this only changed the properties, not the actual graphics of the tile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions