Hey there. I’m not too code savvy so I’m wondering if anyone here can get me started in the right direction. I’m looking to make a board game in Unity (a la classic Mario Party, Monopoly) but I keep getting stuck on basic functions like movement. I.e. roll the dice block, player moves that number of spaces. I’ve tried writing different codes but to no avail and now I’m not sure what it is I’m particularly looking for. Now, there is no code to fix and I’d like to ask for someone to share their knowledge with me. I’m not really sure how else to describe the question but I’m basically just looking for relevant search terms, certain lessons, etc. Things to get me going in the right direction.
I know this is a particularly vague question, so if someone needs clarification just ask me and I’ll try my best. Sorry if there’s a better way to do this, but I don’t post here often so I wouldn’t know. Thank you to anyone in advance.
This is the general idea of how the dice roll will work, but after that I honestly have no idea where to go.
-
public int diceRoll;
-
public int amountMoved;
-
//for player current location on the board
-
public Vector3 currentPos;
-
diceRoll = Random.Range(1, 11)
-
//because if I’m not mistaken I need +1 in order for the code to register 10?
-
amountMoved += diceRoll
-
//To get the amount moved to equal what the player rolled