
Lynn
Novice
Sep 23, 2012, 1:01 PM
Post #1 of 3
(2107 views)
|
|
Moving positions
|
Can't Post
|
|
I need to increment xpos according to a random number 1-6 or deincrement it 1-6. I do not know how to go about that. My thought was:
my $range = 1; my $minimum = 6; my $random_number = int(rand($range)) + $minimum; $xpos = $random_number; #instead of $xpos++ to move one position at a time And then to deincrement 1-6 spaces, I have no idea. Can anyone point me in the right direction, or a good tutorial? Thanks
|