I am making a plat-former in Slick2D, and to handle the map I am using Tiled to make maps. There is one problem:
I have this code to check if a block should be added to an ArrayList of Rectangles to use as collision:
System.out.println(map.getTileProperty(map.getTileId(x,
y, 1), "blocked", "false"));
This returns "true" in the console for the x, y coordinates that have that property . Yet, when I do this:
if (map.getTileProperty(map.getTileId(x, y, 1), "blocked", "false") == "true") {
//Do Stuff
}
The if statement returns false. Does anyone know what to do to make the if statement return true for the tiles that have the blocked property?