Is it possible to have groups of regions? I've looked but it doesn't seem to be so.
This is important to me as my game is based around lots of individual, capturable regions. The most efficient way of tracking 'ownership' of these regions requires that they be handled as a collection.
Am I overlooking something?
My workaround is ugly.
I'm looking at using a UNIT somehow associated with each capturable region which I can manipulate/track/score rather than the region itself.
Yeah, I've considered using any array of regions, but then there's no easy way to respond to a future event and manipulate the SAME region - you don't have the array index. One could perhaps make it work using an improvised pointer thing by having a 2 dimensional array, or by using a set of variables, but this seems n a s t y.
How about looping through array, If I do that, It will be something like everytime you have the region, loop x from 0 to end , if region[x] = that region, then use x for some stuff.
It usually not that inefficient for such simple loop compared to computer nowadays
alright ill give it a bash.
which would you expect to hurt less?
attached-building-ownership-linked-to-region-ownership proxy thing
or
hewge checky loop
given
100 regions (across a 10x10 square board)
expecting perhaps 30-50 'unit enters region' event throws per second once the game gets going.
erm, maybe 10x that amount during endgame..
I worry the building proxy will be the way to go :(
Thanks for your input, soulcarver and crutex.
However, the issue isn't with performing functions on things in a given region, and it is not about aggregating x regions into a single region.
It is about being able to arbitrarily group regions for group manipulation while they maintain their independant definitions in a way that allows for future events to refer to a specific region once any original manipulation has been performed.
So think of all those situations where unit groups are virtually 'required' to do something in a reasonable manner; I have the same situation with regions.
Game design wise, I have 100 capturable regions that can change hands depending on what the participating teams do. I need to implement 'ownership' of those regions against teams in such a way that they can be passed around, just like units.
For the computer scientists among us, I basicly want a collections object for regions, just like we have for units. Sadly, there doesn't seem to be one and the workarounds I've though of / seen so far are a bit pants (refer to my OP and Programmer's post).
It's quite an interesting little gap in the tools the editor provides us with, imo.
However, the issue isn't with performing functions on things in a given region, and it is not about aggregating x regions into a single region.
It is about being able to arbitrarily group regions for group manipulation while they maintain their independant definitions in a way that allows for future events to refer to a specific region once any original manipulation has been performed.
So think of all those situations where unit groups are virtually 'required' to do something in a reasonable manner; I have the same situation with regions.
Game design wise, I have 100 capturable regions that can change hands depending on what the participating teams do. I need to implement 'ownership' of those regions against teams in such a way that they can be passed around, just like units.
For the computer scientists among us, I basicly want a collections object for regions, just like we have for units. Sadly, there doesn't seem to be one and the workarounds I've though of / seen so far are a bit pants (refer to my OP and Programmer's post).
It's quite an interesting little gap in the tools the editor provides us with, imo.
You could add the regions to an empty region every time you need to reference the aggregate region. I didn't read what you were doing with it though :X :D
Yeah I derived such processes myself, the problem is that it's shit n clunky compared with the ideal: a proper collections approach for regions.
This wouldn't be a problem as such if I didn't have 100 regions (as stated) with a crap load of 'unit enters region' event throws per second (as stated).
In other words, the workaround is likely to be laggy as fuck (though that is untested as I haven't constructed the [time-sink] workaround yet).
The implication is that a paradigm slice of games design is all but precluded - should it indeed be laggy - which is pants.
The reason for the post was to see if I was mistaken about there not being a region group object. Sadly, there just isn't one.
Shitbox. I might go look for an editor wishlist that Blizzard claims to care about or has been known to read.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is it possible to have groups of regions? I've looked but it doesn't seem to be so. This is important to me as my game is based around lots of individual, capturable regions. The most efficient way of tracking 'ownership' of these regions requires that they be handled as a collection. Am I overlooking something?
My workaround is ugly. I'm looking at using a UNIT somehow associated with each capturable region which I can manipulate/track/score rather than the region itself.
I'd very much appreciate any ideas you have.
Region Array?
How about looping through array, If I do that, It will be something like everytime you have the region, loop x from 0 to end , if region[x] = that region, then use x for some stuff.
It usually not that inefficient for such simple loop compared to computer nowadays
Yes you can add regions look in the trigger editor
http://forums.sc2mapster.com/resources/tutorials/12641-region-arrays-with-events-and-region-ownership/
I made a tutorial on How to do all this with region arrays.
It includes Ownership of the regions
Am I missing something? Only skimmed.
O_O
http://wiki.sc2mapster.com/galaxy/triggers/add-region-to-region/
You could add the regions to an empty region every time you need to reference the aggregate region. I didn't read what you were doing with it though :X :D
http://forums.sc2mapster.com/resources/tutorials/12641-region-arrays-with-events-and-region-ownership/
I made a tutorial on How to do all this with region arrays.
It includes Ownership of the regions
And if your doing something like
you would do this with my array in the tutorial
get random integer and use the region[random integer] as the region they need to go to for the quest
you can also use Tempory RegionArrays for assigning a list of tempory regions they need to go to.
Just add and remove the regions from the array as needed