karai17 / Simple-Tiled-Implementation

Tiled library for LÖVE
Other
853 stars 121 forks source link

Invisible objects are still rendering. #238

Closed 133794m3r closed 4 years ago

133794m3r commented 4 years ago

I have an object type labeled "teleport point" which I'll use to be the point where a player will be warped to if they move through a door and it's visibility is set to false yet STI is rendering it.

The layer only has that single object on it as I'm just learning tiled and want to keep things simplified.

      type = "objectgroup",
      draworder = "topdown",
      id = 5,
      name = "teleport_points",
      visible = true,
      opacity = 1,
      offsetx = 0,
      offsety = 0,
      properties = {},
      objects = {
        {
          id = 2,
          name = "spawn_point",
          type = "",
          shape = "rectangle",
          x = 224,
          y = 224,
          width = 16,
          height = 16,
          rotation = 0,
          visible = false,
          properties = {}
        }
      }
    },

Screenshot at 2020-08-18 22-47-18

I can provide the TMX and related spritesheets if needed.

karai17 commented 4 years ago

Send me a .love file that I can poke around in~

133794m3r commented 4 years ago

test.zip There's a zip of the whole directory with the tiled map, the tilesets and my God awful testing code.

karai17 commented 4 years ago

I just pushed a commit to fix this. I wasn't checking if objects were flagged as visible before checking them; now I am!