Anyone tried ? I couldn't seem to find a way to return a specific region's area as real value by trigger now. My region would start of as a square or circle, then more shaped are added as the game progress and finally i want the total area of all the shape ( overlapping excluded ).
Also, the region would also change the terrain underneath it ( similar to painting ). I tried the supertexture guide by decal with no luck since i can't restrict a doodad to visible only in a region.
Just throwing it out even though i have no hope :(
Adding or removing shape from region is already supported in the trigger. The only problem is to find the area of that irregular shaped region. I'm thinking of calculus ..
Well, a really lazy solution would be to have a trigger that literally covers the whole map in some invisible unit every x space across and y space down. Make a separate trigger that removes said unit if it's in your designated regions. Add up the units that are left. (Units left/total units) where total units was the number of units that you spawned, this gives you the % of the map that isn't covered by your region. 1-this value gives the % of the map that IS covered by regions. Calculate total area of map using height*width, multiply by this % and you have the area of your map covered by regions, ignoring overlap.
Anyone tried ? I couldn't seem to find a way to return a specific region's area as real value by trigger now. My region would start of as a square or circle, then more shaped are added as the game progress and finally i want the total area of all the shape ( overlapping excluded ).
Also, the region would also change the terrain underneath it ( similar to painting ). I tried the supertexture guide by decal with no luck since i can't restrict a doodad to visible only in a region.
Just throwing it out even though i have no hope :(
Bumb
You can get the height and width of a region through trigger actions.
For a rectangle region, just multiply the height by the width.
For a circle region, 3.1415*(height*0.5)*(width*0.5). This works for ovals too.
Overlap is much trickier. I have a few ideas how you'd do it, but nothing that I've actually had experience with.
@Eiviyn: Go
Adding or removing shape from region is already supported in the trigger. The only problem is to find the area of that irregular shaped region. I'm thinking of calculus ..
Well, a really lazy solution would be to have a trigger that literally covers the whole map in some invisible unit every x space across and y space down. Make a separate trigger that removes said unit if it's in your designated regions. Add up the units that are left. (Units left/total units) where total units was the number of units that you spawned, this gives you the % of the map that isn't covered by your region. 1-this value gives the % of the map that IS covered by regions. Calculate total area of map using height*width, multiply by this % and you have the area of your map covered by regions, ignoring overlap.
Inefficient, yet simple.
Thanks, this seem plausible (lag free). Also, counting number of that Unit Type unit within said region is much simpler
Not that simple, overlapping need to be excluded :P