2012-08-03, 12:53 PM
(This post was last modified: 2012-08-03, 01:10 PM by Unauthorized Intruder.)
I think you should put it right between update and positionupdate. I think loop could also be like this.
Also, delete position += diceroll line; position will be added within the loop.
That's the case you may need to animate the movement, but if you don't just use this
Also, delete position += diceroll line; position will be added within the loop.
Code:
boolean reach = false;
while(diceroll > 0)
if(position == 32)
reach = true;
if(reach)
position--;
else
position++;
diceroll--;That's the case you may need to animate the movement, but if you don't just use this
Code:
position += diceroll;
if(position > 32)
position = 64 - position;
