So i'm making a 2D game and I am using a Tilemap. I want to spawn a specific Tile at a random location on the Tilemap, but it has to be 6 tiles away from the player characters Tile position (the player takes up 1 tile). Of course the player will be moving in the game, so i'm looking to make this happen in real time, and continue to happen every 10 steps the player takes. Does anybody have any experience doing this? I'm not really sure where to start on this one. Any help would be greatly appreciated, thanks!
↧