blindcoder Posted June 3, 2015 Share Posted June 3, 2015 Hi again. For a mod I'm currently writing I want to check if a square can be traversed in a direction.Currently, I do this: local cell = getCell();local sq = cell:getGridSquare(x, y, 0); -- Need ground floorif sq:getProperties():Is(IsoFlagType.collideN) then -- do somethingendThis works fine for walls, but unfortunately not for windows, doors and probably also not for player-built walls.Is there a reliable way to check if a tile can be traversed in a certain direction? Link to comment Share on other sites More sharing options...
blindcoder Posted June 3, 2015 Author Share Posted June 3, 2015 Just figured it out with help from BryBry:local sq = cell:getGridSquare(x, y, 0);local nsq = cell:getGridSquare(x+1, y, 0);if sq:isBlockedTo(nsq); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now