Just wondering, does a random point between points mean that if I had 3 points (p1, p2 and p3) and said to do something at a random point between p1 and p3 that it would always happen at p2 or would it select a p1 p2 or p3 at random?
Rollback Post to RevisionRollBack
The Team - TnTProductions
TnTProductions latest Project - Docking Bay 13
TnTProductions Epic RPG in the making - Psionics: Chaos Rising
Check out our website on wixx! http://bulletbutter.wix.com/tntproductions
I haven't actually looked at this, but I'd have to say that if you were asking something to pick a random point between two end points P1 and P3, then it would return a random point on the line of P1-P3. If you wanted the game to select a random point from a list of points you define, you need a point array and then refer to a random position in it using the Math.Random function.
Ok thanks, after your replies I tested it out. I just didn't want to waste the time trying to do something the wrong way.
Turns out it does mean any random x, y coordinate on a line.
@SCMapper - Thanks for answering my next question without me having to ask :p
Rollback Post to RevisionRollBack
The Team - TnTProductions
TnTProductions latest Project - Docking Bay 13
TnTProductions Epic RPG in the making - Psionics: Chaos Rising
Check out our website on wixx! http://bulletbutter.wix.com/tntproductions
To post a comment, please login or register a new account.
Just wondering, does a random point between points mean that if I had 3 points (p1, p2 and p3) and said to do something at a random point between p1 and p3 that it would always happen at p2 or would it select a p1 p2 or p3 at random?
I haven't actually looked at this, but I'd have to say that if you were asking something to pick a random point between two end points P1 and P3, then it would return a random point on the line of P1-P3. If you wanted the game to select a random point from a list of points you define, you need a point array and then refer to a random position in it using the Math.Random function.
Yes, it should actually mean "any random X,Y coordinate in the line which connects A and B"
Ok thanks, after your replies I tested it out. I just didn't want to waste the time trying to do something the wrong way.
Turns out it does mean any random x, y coordinate on a line.
@SCMapper - Thanks for answering my next question without me having to ask :p