TheBlackSword Posted November 18, 2016 Share Posted November 18, 2016 How would I create basic enemy AI (say, have a guard patrol and when he hits a wall he turns around) when using tilemaps? I tried using the blocked property but that didn't seem to work. Link to comment Share on other sites More sharing options...
gnl Posted November 18, 2016 Share Posted November 18, 2016 Basically you would have to use physics.arcade.collide method between your character and the layer group in your update function with a callback function after having set the index of the tiles you want to collide with by using the map.setCollision function while creating your map and layer. Link to comment Share on other sites More sharing options...
Recommended Posts