Is it possible to get a random point in region A, which isn't in region B, if the regions overlap? I tried to make a function, that gets random points until the point fulfil these conditions, but there is a problem: Region B can contain the complete region A. If region A is complete in region B, the function should return no point. How can I do this?
Ive been over this kinda quite a bit and the "random point" function doesnt work very well.... if has an internal fail check that if it takes to long to find a valid point it will return a point that doesnt hold to what you want..
Now you could just keep looping till a random point matches additional conditions you check it against..... but the random point function isnt very random IMO so you have to loop through "ALOT" which in a case where you randoming alot of points for alot of players it may actually cause a battle net game to de-sync.
S3rius proposed a way to me to do things a bit differently ... heres a topic we talked about it on..
@s3rius: Go
I was having players complain to me about de-sync errors..... that occurred during my radoming / semi-infinite looping while generating points.....
not entirely sure if thats true or not...
Ive been over this kinda quite a bit and the "random point" function doesnt work very well.... if has an internal fail check that if it takes to long to find a valid point it will return a point that doesnt hold to what you want..
Now you could just keep looping till a random point matches additional conditions you check it against..... but the random point function isnt very random IMO so you have to loop through "ALOT" which in a case where you randoming alot of points for alot of players it may actually cause a battle net game to de-sync.
S3rius proposed a way to me to do things a bit differently ... heres a topic we talked about it on..
http://forums.sc2mapster.com/development/triggers/15555-trigger-gui-random-point-failure/