Quantcast
Channel: Questions in topic: "random spawn"
Viewing all articles
Browse latest Browse all 125

Spawning a specific Tile in a random position a certain distance from the player character

$
0
0
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!

Viewing all articles
Browse latest Browse all 125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>