I want to set up a game where two characters rotate between 8 static spots whenever a function is called. So if character one is at position one, he moves to position number two, if he’s at two he goes to three, and so on until the eigth position where it loops. I would assign each tile a number (1-8) and the two players would also have a number matching with the tile they are standing on.
My question is if there is a command that allows me to compare the value of a character and the tiles and act accordingly. For example: Player 1 is at position number 5 and therefore has the value 5, when the function is run, his value goes up to six and therfore transitions to position number 6.
I would guess there is a way to check individual numbers for a match between two variables (that is, compare the player’s position number to the tile’s number) but I don’t know how it would be done.
Thanks in advance for any help I can get.