Staredit Network > Forums > SC2 Assistance > Topic: Efficient award system
Efficient award system
Feb 28 2011, 3:12 pm
By: playpong  

Feb 28 2011, 3:12 pm playpong Post #1



Hi all, I've made a map that's sort of like Risk. There are Auto-Turrets in the center of 12 territories, and a timer that counts down. When the timer hits 0, it awards the owner of each territory with the territories default unit award. Some territories spawn 2 units, others spawn 1.

I have it all set up and working correctly by whenever a turret dies, it grabs it's custom value (which is set to it's original starting position on the map) and then creates a new turret for killing player at those coordinates, and then sets the new turret's custom values to match. Then, when the timer runs out, it checks the owner of each territory (through 12 different if/then) and gives the hard-coded unit award to the owner of the turret at the center of the region that the turret is in.

The issue I have with it is, while yes it works but, i feel it could be a lot more efficient.

Ideally I guess, it would be nice to have a Region Group somehow, so I can spawn a turret at Center of Picked Region instead of having to specify which region and which coordinates specifically.

Then it would be nice to have variables set, one for each territory, that contain an array of unit types and the quantity of each unit type that will be awarded for their corresponding territory.

Does that seem like a better solution? If so, I can't seem to figure out how to get that group effect with regions, so any help or ideas on the matter would be really helpful!



None.

Feb 28 2011, 4:41 pm Ahli Post #2

I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

There are only groups for players and units. :(

You can use a global array (variable that is an array on the left side where your triggers are) to store all regions or points (seems like you need points only to set spawn points).

For the unit types + quantity you would need 2 arrays unittype[areaID] and quantity[areaID].




Feb 28 2011, 5:13 pm playpong Post #3



So something like this?


globalTerritory[x, y]

Group all turrets on the map (?)

playerStart[player, x, y]

Group all user players into playerGroup

awardType[unit type]
awardQty[1,2,3]

for each globalTerritory[] create unit Auto-Turret at X of globalTerritory[x] and Y of globalTerritory[y]

pick each player in player group, give control of turret (at globalTerritory[playerStart[x] , playerStart[y]]) to playerStart[player]...

...
...

if turret dies, then
-create turret at X of custom value 1 of triggering unit and Y of custom value 2 of triggering unit
...
...

when timer expires, then
-for each turret in turretGroup, create unitQty[] of unitType[] at globalTerritory[x,y] for owner of unit Picked unit in turretGroup...
...
...



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:53 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: I'll check it out this weekend!
Thanks
[02:47 am]
Symmetry -- I'll check it out this weekend!
[02:40 am]
Mr.BurnLiquid -- Symmetry
Symmetry shouted: Another map maker? Damn we really ARE back
I invite you to try out the map I modified. I don't have the creativity to create maps from scratch, but I do have the know-how to modify existing ones; my project is to tweak community campaigns (specifically those with errors—to make them playable.
[02:27 am]
Symmetry -- Another map maker? Damn we really ARE back
[01:51 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Now that I wanted to change my avatar, the error image is showing up, haha.
[01:34 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
I invite you to try out a mission I'm modifying from *StarCraft Reversed*; I'm trying to make it more playable and challenging.
[01:33 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: Mr.BurnLiquid actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
Thanks; I'm new to the site and a Spanish speaker. I must have missed the part where it was prohibited—I'll change it now.
[01:31 am]
Ultraviolet -- Mr.BurnLiquid
Mr.BurnLiquid shouted: Ultraviolet Is it forbidden to have a large avatar?
actually yeah though I wasn't really saying it to narc on you. It just caught me off guard because I don't usually see it (because it's against the rules) "The avatar may not be bigger than 150x150 pixels". Kinda silly that it relies on users to be well behaved rather than just limiting the dimensions on uploads :lol:
[12:20 am]
Mr.BurnLiquid -- Ultraviolet
Ultraviolet shouted: https://staredit.net/profile/133367/ dude's avatar is massive
Is it forbidden to have a large avatar?
[12:04 am]
Ultraviolet -- https://staredit.net/profile/133367/ dude's avatar is massive
Please log in to shout.


Members Online: UndeadStar, Ultraviolet