more than one catch on random numbers
Posted: Sun Oct 22, 2006 2:00 pm
hey.
Im making a RPG (my first) where you walk throu a maze and end at one random tile. Dont get it? Example
123456789
1 "#######"
2 "# # # # #"
3 "#--------#"
4 "######"
say you end at row two, but u could exit the maze at either 2,2 2,4 2,6 or 2,8
If i want this to be random (I.E. the computer randomly chooses which of the exits you go to), is their a way to only chose one of those coridantes,
and not one that has a "#" at it? this code wouldnt work:
exitrow: 1
exitcolumn: INT(9*RND)+1
END
this wouldnt work cuz it could chose a number with a # on it. So does anybody know how to make a random number only chose numbers 2, 4, 6, 8
out of my maze?
thnxs
PS srry if this was confusing
PPS the --- in the example are just their so the maze looks right, they wont be their in the end
Im making a RPG (my first) where you walk throu a maze and end at one random tile. Dont get it? Example
123456789
1 "#######"
2 "# # # # #"
3 "#--------#"
4 "######"
say you end at row two, but u could exit the maze at either 2,2 2,4 2,6 or 2,8
If i want this to be random (I.E. the computer randomly chooses which of the exits you go to), is their a way to only chose one of those coridantes,
and not one that has a "#" at it? this code wouldnt work:
exitrow: 1
exitcolumn: INT(9*RND)+1
END
this wouldnt work cuz it could chose a number with a # on it. So does anybody know how to make a random number only chose numbers 2, 4, 6, 8
out of my maze?
thnxs
PS srry if this was confusing
PPS the --- in the example are just their so the maze looks right, they wont be their in the end