Quantcast
Viewing all articles
Browse latest Browse all 102

Help with making a map based game!

Hey im trying to make a game where the main screen is a map and you can click to move around and moving will cost food. and im kind of a beginner the map: ![This is how the map looks like][1] [1]: /storage/temp/127326-map-prot.png Right now i have got a movement script: void Update () { if (Input.GetMouseButtonDown(0) && isWalkable == true && food >= reqFood) { player.position = Camera.main.ScreenToWorldPoint(Input.mousePosition); } } but i can just walk around anywhere and i dont know how to do so the game knows how long it is to the destination so a reqFood will set!

Viewing all articles
Browse latest Browse all 102

Trending Articles



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