I would like to know how to make a unit move left, down, up, right, and diagonally through mobile grids (let's say the unit moves up; it will then be "moved" to a set location above it and etc.).
I am using hyper triggers and deaths, and I kinda get the concept of going left, down, up, and right (although a test map or good instructions would definitely be a plus), but I'm having trouble finding a way in making the unit move diagonally.
Thank you!
None.
Have you already seen the
wiki article on grid systems/mobile grids?
Currently Working On: My Overwatch addiction.
Have you already seen the
wiki article on grid systems/mobile grids?
I actually read it prior to writing this topic because I couldn't fully understand, mainly because I'm more of a visual guy hahaha
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
You got up, down, right and left working, right? The gist of it is that if you detect the unit in the left location (aka just entering) you move it there (to the center).
Moving diagonally is a bit more tricky since you likely scrape one of the horizontal or vertical locations which would be the condition to move it there instead of diagonally.
So you can wait until the unit is also not in the middle location anmyore AND give priority to diagonal locations (aka move the triggers for them higher in the list).
Given sc's stupid pathfinding ai you might also have to add a delay or adjust the size of the grid locations.
For diagonal movement, you could detect that a unit (using the upper left movement as an example) has moved into the location above it and the location to the left of it (have this trigger come before the "only left" and "only right" movements)
For precision location movement in the cardinal directions, I've made some thorough documentation:
http://www.staredit.net/topic/14750/Move right: Create 3, remove 2, center.
Move left: Create 8, center.
Move down: Create 2, center.
Move up: Create 6, center.
I don't have documentation for diagonal movement, but working off this image...
To move a location to the lower left, create 9, center loc on dev
To move a location to the upper left, create 7, center loc on dev
To move a location to the upper right, create 5, remove 2, center loc on dev
To move a location to the lower right, create 3, remove 2, center loc on dev
Example map for moving to the upper right attac
Attachments:
Post has been edited 3 time(s), last time on Apr 7 2013, 6:50 pm by jjf28.
TheNitesWhoSay - Clan Aura -
githubReached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.
An artist's depiction of an Extended Unit Death
I am using hyper triggers and deaths, and I kinda get the concept of going left, down, up, and right (although a test map or good instructions would definitely be a plus), but I'm having trouble finding a way in making the unit move diagonally.
The technique I use is to create all except the last unit for one player, and then create the last unit for another player, and then center the location on the last unit. The direction is entirely based on how many units you create for the mobile grid:
1 = Middle (nowhere)
2 = Down
3 = Down-Right
4 = Right
5 = Up-Right
6 = Up
7 = Up-Left
8 = Left
9 = Down-Left
Since you said you were a visual person, I made a gif showing a location moving right and left based on the number of Devourers you create:
You should be able to just copy the actions in the image and change the number of units you create for Player 1 to get any direction you want. (On a side note, the "Remove All" assumes that both P1 and P2 are in the game; because of a quirk, if you create units for a non-player, using player groups such as "All Players" will not work for those units. A safer implementation would be to have "Remove All for Player 1" and "Remove All for Player 2" to remove the mobile grid units.)
Post has been edited 1 time(s), last time on Apr 7 2013, 11:04 pm by Roy.
Ah I see. For all who've posted, thank you
None.
I don't know if anyone has mentioned it yet, as I know this wasn't covered very well in the wiki-topic. But THIS, is what you will want to do before you place your grid to counter the "offset glitch".
Create two devourers where you want your grid to be.
The first devourer created (the one in the middle) is the one that has a chance to be offset. So, you want to remove this devourer, not by means of grid-mechanics, but by removing the devourer in the center of a grid by removing the devourer at a small location in the middle.
After you remove the center devourer at the smaller location, you will be left with the second devourer, which will be located on the grid perfectly. Center the grid location on this new devourer, remove it, and use another grid to move your grid back up to its original location.
None.
Find Me On Discord (Brood War UMS Community & Staredit Network)
Instead of using another location can't you simply have the first devourer created a different player to the second devourer?
Yes. Come to think of it, I think they could be owned by the same player, and SC would select the bottom-most one, whether there was an offset glitch or not, since the offset glitch would place the first one further right if it were to happen.
Post has been edited 1 time(s), last time on Apr 10 2013, 1:00 am by Leeroy_Jenkins.
None.
Find Me On Discord (Brood War UMS Community & Staredit Network)
Based off that yes it seems the middle one is removed last in the middle column only (how da fuck does that work?). But with offset glitch I think if they are not on the same vertical axis it goes from leftmost first...
Yeah well I'm not sure if it always offsets the first one to a certain direction, so the best bet would be the two different players. Surprised no one mentioned this though cause he's gonna need it for an accurate mobile grid.
None.
Find Me On Discord (Brood War UMS Community & Staredit Network)
That's how I create explosion patterns with mobile grids - by creating with different players. Player X gets all their devourers removed, and Player Y gets all their devourers killed. This combined with knowledge of the order of creation allows you to make patterned explosions with devourers/wraiths/observers.
Based off that yes it seems the middle one is removed last in the middle column only (how da fuck does that work?).
This combined with knowledge of the order of creation allows you to make patterned explosions with devourers/wraiths/observers.
Looks like you answered your own question. Corrct me if I'm wrong, but horizontally, unit finding works from left to right but on the same x-coordinate, it goes vertically by the reverse order of unit creation, last in is first out and first in is last out. It probably has a tie-in to unit IDs but I don't really know all of the technical things going on there.