|
Anonymoose DELIVERS.
|
Quite accurate? Are you kidding? The grid gives only 8 possible directions (16 if you make it a 5x5). The most accurate way is to follows these steps:
1. Detect the coordinate of the unit the ovserver is flying from 2. Detect the coordinate of the unit the observer is moving to 3. Calculate the X and Y difference between them using binary countoffs. 4. Add those X and Y differences to the unit's coordinates (any unit from the two) until you leave the 'arena'. 5. Order the observer to move to the coordinate calculated in the previous step by using either mobile grids or location grids, or a combination of those. Of course there is a question of this being rational... is what you're trying to do really essential for your map? If yes, then use it; if not don't use it or use the so-so accurate methose Falkoner posted. Also forgot to say that with my method, you can handle any amount of observers heading at the same player, as long as you do all the desctibed actions for every observer. ![]() ![]() ![]() ![]() ![]() ![]() Live as if you were to die tomorrow. Learn as if you were to live forever. ~Mahatma Gandhi
Don't be afraid to care. ~Pink Floyd |
|
Thats not going to happen
|
http://www.staredit.net/?p=tutorials&tut=47
Then you'd just have to do some math to find your trajectory (Or is this what you wanted to know?) ![]() ![]() ![]() ![]() ![]() ![]() |
|
Anonymoose DELIVERS.
|
Not necessairly a ground unit grid. You can make the X and Y coordinate axis with pre-placed units for both coordinate detection and setting the final destination location (first travel on one of the axis and then move with a mobile grid from there).
![]() ![]() ![]() ![]() ![]() ![]() Live as if you were to die tomorrow. Learn as if you were to live forever. ~Mahatma Gandhi
Don't be afraid to care. ~Pink Floyd |
|
Omg got a title!
|
You could try to implement something like this http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
It is a very simple algorithm which draws a line given its source and destination points. I think it only uses additions and substractions (no multiplications or divisions). Although the map could become very complex. ![]() ![]() ![]() ![]() ![]() ![]() _______________
G T C A A G T C \__________________________ C A G U···/ŻŻŻŻ\ A G T C G A G A T C A G T ··········\____/ T C A G C T C T A G T C A C A G T T C A G /ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Was anyone missing my DNA signature? |
|
Write your own destiny, or else someone will write it for you!
|
You could try to implement something like this http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm It is a very simple algorithm which draws a line given its source and destination points. I think it only uses additions and substractions (no multiplications or divisions). Although the map could become very complex. ![]() ![]() ![]() ![]() ![]() ![]() ![]() http://sonsofwar.pyrom.net/index.html___0% 100% |
|
Omg got a title!
|
Yeah, of course. If there's no other method you could let it fly for a given amount of time then use its current position as the end point. It would be quite accurate.
![]() ![]() ![]() ![]() ![]() ![]() _______________
G T C A A G T C \__________________________ C A G U···/ŻŻŻŻ\ A G T C G A G A T C A G T ··········\____/ T C A G C T C T A G T C A C A G T T C A G /ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Was anyone missing my DNA signature? |
|
Taking StarCraft Map Making to the Limit!
|
Yeah, you can get it accurate, just not THAT accurate.
While I'm here, may as well ask if there is a way to slow down air units like you can ground Not really, the only ways I know of make the player have to reselect it or keep clicking rapidly to make it move at all. |
|
(WARNING UNTESTED)I got a good idea but it'd only work for drones scvs and probes. Center a 1 pixel big location on a power up (that the drone carries) and order the drone to move to it. The drone will never reach it because the drone carries the power up in front of it. It is like a carrot on stick.
![]() ![]() ![]() ![]() ![]() ![]() |
|
In an infinity of snow, each flake has but one life.
|
(WARNING UNTESTED)I got a good idea but it'd only work for drones scvs and probes. Center a 1 pixel big location on a power up (that the drone carries) and order the drone to move to it. The drone will never reach it because the drone carries the power up in front of it. It is like a carrot on stick. I tested this with a drone and a crystal, and it doesn't work. Nice idea, though. ![]() ![]() ![]() ![]() ![]() ![]() ![]() |