Interesting question, but I would guess that when you combine two regions like that they become one as far as the game is concerned and it is unlikely the chances will increase.
Development > Triggers
question about regions
- 8 posts
-
rtschutter Regular Shmoe
- Join date
- Apr 27, 2010
- Location
- United States
- Reputation
- 6
- Posts
- 292
- Last login
- Jun 02, 2013
-
Monkalizer Author
- Battle.net
- Monk
- #2491 EU
- Join date
- Sep 22, 2011
- Location
- Sweden
- Reputation
- 4
- Posts
- 212
- Projects
- 1
- Last login
- Jun 18, 2013
@rtschutter: Go
Yeah: under edit there is the merge option. Once merged - they will act as one!
-
Mille25 Author
- Join date
- May 06, 2010
- Location
- United States
- Reputation
- 10
- Posts
- 441
- Projects
- 2
- Online now!
Quoting from natives.galaxy:
// RegionRandomPoint attempts to find a random point somewhere within the region. For regions // containing only a single positive shape, this is guaranteed to work, but for more complex // sets of shapes it may give up after a maximum number of tries and return (0, 0). // native point RegionRandomPoint (region r);
Be careful with random points within merged regions, since it might return 0,0.
Last edited Jan 29, 2013 by Mille25 -
Bommes Regular Shmoe
- Join date
- May 14, 2008
- Location
- Germany
- Reputation
- 15
- Posts
- 298
- Last login
- May 03, 2013
-
BasharTeg Author
- Battle.net
- Miles
- #152 NA
- Join date
- Sep 15, 2010
- Location
- United States
- Reputation
- 31
- Posts
- 1,141
- Projects
- 4
- Last login
- Jun 18, 2013
Quote from Bilxor: Go
when you have a region of 2 circles that partially overlap, and then you spawn an event at a "random point within that region," will the overlapped area be twice as likely to spawn the unit as the un-overlapped area? I've done some testing but it's hard to say because it's all based on probability.
The probability that a point within the overlapped area is selected over a point in the non-overlapped area depends on the size of the overlap area compared to the size of the non-overlapped area.
That, at least, sounds correct in my head.
EDIT: This is considering that the two regions are not merged.
Last edited Jan 29, 2013 by BasharTegMy Projects:
Malum Ruina: SC2Mapster
Eternal Exile: SC2Mapster
Spine Crawler Madness: SC2Mapster
Xeno Crisis: SC2Mapster -
playpong Regular Shmoe
- Join date
- Feb 21, 2011
- Location
- United States
- Reputation
- 1
- Posts
- 137
- Last login
- Mar 11, 2013
Correct :) It would depend on the amount of overlapped space compared to non-overlapped space. So let's say that you had 2 separate regions of the same size, and they were overlapping by half. If you're choosing to spawn a unit into just one of those regions, then the odds are 50/50 that it will be in the area that is overlapping, because half of the whole region is. If you're spawning a unit into one of the two regions randomly, you're still getting 50/50 odds, because that would imply 4 possible outcomes, 2 of which being in the overlapping section.
If it's a merged region, then it's being treated as one region and there is no overlapping area anymore.
- 8 posts

Bilxor Regular Shmoewhen you have a region of 2 circles that partially overlap, and then you spawn an event at a "random point within that region," will the overlapped area be twice as likely to spawn the unit as the un-overlapped area? I've done some testing but it's hard to say because it's all based on probability.