Board Game Problem
Blitz3D Forums/Blitz3D Beginners Area/Board Game Problem
| ||
Need help I am creating a Blitz3d board game my problem is I need to throw the dice and move the player along the board, Ok I know how to throw the dice and hold the Dice number in a variable. But how do I check where I am on my Board. I have worked out all the positions In X,Y,Z Variables that are possible for the players to move to, is there a way to say Postion_1 = X,Y,Z Postion_2 = X,Y;Z if this was possible then I could say Player_1 =Position_1+Dice if Dice was say 4 THEN I could move the player to Position_5 If someone can help Code would be nice I have tried using Arrays[] did not work well I got more in a knot and confused. Thanks |
| ||
Personally I would use an array for this; set up array for 11 positions (zero based) Dim Position(10,2) ; Data x,y,z for each position Data 10,0,10 data 12,0,10 data 14,0,10 data 16,0,10 data 16,0,12 data 16,0,14 ... etc ; Read in positions for n=0 to 10 read position(n,0),position(n,1),position(n,2) next to place a player at position 4 for example positionentity player,position(4,0),position(4,1),position(4,2) |
| ||
Maybe my explanation of Arrays on my programming website might be helpful... |