|
Write your own destiny, or else someone will write it for you!
|
For finding adjacent boxes of 3x3 tiles you use a mobile grid I suppose. Using devourers you'd get a 2x2 grid, but you need either 3x3 with 9 units (not possible) or a 1,5 with 25 units. I'm not sure how you'd achieve that.
Looking at your pictures I suppose your mobile grid locations are not perfectly placed above the burrowed IT's and may overlap to the wrong IT. A quick fix to check for that would be to make the location(s) of the mobile grid smaller. you could also create/kill test units at each of the mobile grid locations to check for correct centering on the IT's. ![]() ![]() ![]() ![]() ![]() ![]() ![]() sonsofwar.pyrom.net/current/index2.html_0% 100% |
|
Architect
|
I do not use a mobile grid. At first I did use one but like you said it is a pain to get correct sizes for 3x3. I don't like using 2 grids anyway so I used a different (more efficient and smaller) method so that I only need the static grid.
So the only grid around is the static one with IT's which I thought would be placed perfectly with SCM Draft (that's indeed the editor I use). When I get home from work I'll try to place all the IT's in the same order as starcraft checks them (ie: bottom left to upper right). I hope it works. I would make sense that that would be the problem because the bug seems to be happening more and more frequent. Since at first I thought I accidently stacked some IT's I deleted/re-created a few just to be sure, and then a few more and a few more, etc. So the whole grid will be mess if you look at the ID's and in-game the locations are a mess... which is hopefully not just a coincidence. Oh, Nuderaider, I'm already using constant create/kill triggers to find out the positions of the locations. The locations are in fact placed perfectly centered, but just on the wrong spots. After having decreased the size of the 3x3 location I figured that the centering was not the problem. Thanks for your input, the both of you! BTW, do you know if anyone besides GoldenUrg ever made chess? (GoldenUrg made chess years ago, but took 13k lines of code and over an hundred locations, which seems rather odd to me.) ![]() ![]() ![]() ![]() ![]() ![]() Meh.
|
|
Architect
|
Falkoner, I love you!
It was indeed the ID number of the units which messed it all up. I had to remove all the IT's and carefully re-place them in vertical lines from down left to upper right. Result? It works perfectly, just like it should. Now my method appears to have no more flaws works it will only take 1 trigger per piece. The castling move might proof tricky though, and pawns as well (different advance-attack; en passant; promotion, double advance on first move). When I make some more progress I'll probably start a production thread, just for the fun of it I guess (and for input on which tournament/multiplayer options should be implented). EDIT: Btw, I would like to know more about this phenomena. You say that SCM Draft is funny with the way it places units as it gives them ID's in the order you created them. Does Staredit give unit ID's on their position? I remember that in-game created units also receive ID's in the order they are created so how is it that SCM Draft is strange for doing the same for pre-placed units? (btw, doesn't that allow you to use UED commands on pre-placed units?) Also, first I thought (and was told) that Starcraft selects units based on their position (ie: first left under) hence the possibility of static/mobile grids. Apparently Starcraft first checks X coordinate, then ID and then Y coordinate (which only matters on pre-placed grids). I'm still thinking of how this could be taken advantage of, but until now it only seems rather iritating. Meh. This post was edited 2 times, last edit by Daedalus: May 13 2008, 8:24 pm.
![]() ![]() ![]() ![]() ![]() ![]() Meh.
|
|
Write your own destiny, or else someone will write it for you!
|
y-coordinate is not taken into account. The rest is like you say.
Probably the myth about units with higher y-coordinates are checked first was created by the use of mobile grids. Units are usually created bottom to top (or was it vice versa?) when there's no space at the center of the location. However that means, units with lower y coordinate units have lower IDs, so the y-coordinate rule often works when working with grids. ![]() ![]() ![]() ![]() ![]() ![]() ![]() sonsofwar.pyrom.net/current/index2.html_0% 100% |
|
Top to bottom actually. When saving in Staredit units are ordered based on their position, rather than the order you placed them in like in Scmdraft2. Higher ones are first and lower ones are last, which means the lower ones have higher IDs and are therefore selected first by triggers.
I don't know what you mean about the game creating them like that. You know it uses some crazy spiral pattern. ![]() ![]() ![]() ![]() ![]() ![]() |
|
its only a guess but uhm
maybe the removal order really is just from left to right... like look: Creation order 07 06 05 08 01 04 09 02 03 in letter form: G F E H A D I B C and everytime one of the units are created, each one is offset a little to the left of the unit before it... so none of them really have the exact same pixel x pos (can prolly be checked via EUD, i wouldn't know im not to familiar wit EUD's) then, they just get removed from left to right... so if i gave every unit a 'unit' x itd probably be: A: 0,0 B: -1,-100 C: 98,-100 D: 97,0 E: 96,100 F: -5,100 G: -106,100 H: -107,0 I: -108,0 i made each Unit 100 U's (U in place of an actual unit of measure for simplicity) wide and tall so that the small X's offset would be easy to follow without making the situation impossible to imagine ok so removing units just based off of their pos X itd go: I,H,G,F,B,A,E,D,C or 09, 08, 07, 06, 02, 01, 05, 04, 03 heres the grid again, to compare: 07 06 05 08 01 04 09 02 03 G F E H A D I B C which translates perfectly to the wiki's removal order: 03 04 07 02 06 08 01 05 09 so iono, i think Blizz made it so that every unit is offset by a given X amount every time its created so they could have a simple way of removing/killing units (the most left 1) Blizz did pretty much simplify a lotta stuff so maybe this is another 1 of 'em edit: whoops, the very firs grid was wrong... fix'd it : ) This post was edited 1 times, last edit by ZzEzZ: May 16 2008, 5:14 am.
![]() ![]() ![]() ![]() ![]() ![]() |
|
Write your own destiny, or else someone will write it for you!
|
Nice idea, ZzEzZ, but it isn't because they're displaced to the left, it's because they're created last = higher Unit ID = removed first.
Btw. when it would solely depend on coordinates, what would happen when you move a bunch of burrowed units somewhere. They'd definitely have exact same coordinates. ![]() ![]() ![]() ![]() ![]() ![]() ![]() sonsofwar.pyrom.net/current/index2.html_0% 100% |
|
oo, true true... didn't consider burrow thingys >.< and ooo its unit ID order? ic... so what about a unit that is created first, but moved to the "square" last? does it get removed first or last? or sumwhere in between?
and np falk : ) This post was edited 1 times, last edit by ZzEzZ: May 16 2008, 5:14 am.
![]() ![]() ![]() ![]() ![]() ![]() |