I'm having trouble coming up with a solution to this problem. I need to center a location at the point between two units (range within same screen). Don't even know where to begin!
Post has been edited 1 time(s), last time on Jul 25 2009, 2:32 pm by crutex.
None.
Mobile grids, chicko. Keep doing mobile grids outward, at the same time, until they touch, the point at which they touch is the center.
None.
Mobile grids, chicko. Keep doing mobile grids outward, at the same time, until they touch, the point at which they touch is the center.
That would potentially take a lot of cycles wouldn't it?
None.
There are two possible solutions: the laggy but simpler one and the lagless but harder one.
The laggy one involves mobile grids. Though I called it 'laggy', it is not always true. It only becomes laggy when you have to cover large distances or you don't know where the units are in relation to each other. The second condition seems to hold, judging by the limited description of the problem you gave us.
The lagless solution involves Location Grids. Those are systems you might not want to deal with if this middlepoint problem is not fundamental for your map.
If you tell us more, we will pick the best solution and describe it in detail for you.
Regardless of what we choose, it would be a good idea to read the
Grid Systems article.
None.
((x
1 + x
2)/2),((y
1 + y
2)/2)
Would this be used in the lagless one?
None.
((x1 + x2)/2),((y1 + y2)/2)
Would this be used in the lagless one?
Yes. We would first get the coordinates and then plug them into this formula.
Then again, one could do this: find coordinates of both units and then, after comparing them in a slightly different formula, launch a mobile grid starting from one of the units. In fact, I like this solution the most - it does not require a location grid and will not cause much lag.
I say go with this method unless you have flying units between the two units.
If you feel inconfident about how to do it after reading through the
Unit Coordinate Detection article, the
Binary Countoff article and the
Counter Arithmetic articles, post any questions you may have and we'll gladly answer them.
None.
ya I am definitely not using a coordinate grid system and will think of something else if that's the only decent solu.
None.
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
None.
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
None.
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?
None.
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?
you need 1 burrowed unit for each demarcation on each axis (2)
None.
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?
you need 1 burrowed unit for each demarcation on each axis (2)
If by demarcation you mean 'deseletion', you're wrong. Just... read through the Grid Systems article to fully understand what they're about and how they're made. It might actually show you that they're simpler than you think.
None.
By 'coordinate grid' do you mean 'location grid' or 'unit coordinate detection system' ? A location grid is hard (relatively) to set up, but a coordinate detection system is not.
I mean the shit where you have 2 burrowed units for each grid point
There is no such thing in common use. It's either no burrowed units or one burrowed unit per grid point. I think you've been misinformed by someone. Did you read the articles I suggested?
you need 1 burrowed unit for each demarcation on each axis (2)
If by demarcation you mean 'deseletion', you're wrong. Just... read through the Grid Systems article to fully understand what they're about and how they're made. It might actually show you that they're simpler than you think.
ya I am not wanting to use this system
None.
If you're not willing to use a coordinate system (which is a bad choice, believe me; it is very simple so set up), then you can either use only mobile grids (grossly ineffective) or just order two cloacked wraiths to move from one unit to the other (where they collide is the middle point; this method is really slow though).
None.
what if u had interceptors from a place where they were cloaked replace those cloaked wraiths? (Since crutex said within same screen, with interceptor's speed, wouldn't they collide before being fully visible?) But as stated b4, telling exactly what u need accomplished/and the purpose (besides just finding midpoint, tell 'y' u need to find the midpoint for, any info would be helpful rly)
None.
what if u had interceptors from a place where they were cloaked replace those cloaked wraiths? (Since crutex said within same screen, with interceptor's speed, wouldn't they collide before being fully visible?) But as stated b4, telling exactly what u need accomplished/and the purpose (besides just finding midpoint, tell 'y' u need to find the midpoint for, any info would be helpful rly)
It takes about 2 seconds for them to become visible. That might be enough. The problem is that you need two computer players to use the generic/patrol trick.
None.
Wait a minute, if they're within the same range, you should DEFINITELY use Mobile Grids, it should only take a few trigger cycles, depending on what size unit you use for the grids.
None.
Wait a minute, if they're within the same range, you should DEFINITELY use Mobile Grids, it should only take a few trigger cycles, depending on what size unit you use for the grids.
It can be done within one trigger cycle: grids can be run multiple times per loop, as long as you do it carefully.
And I'm just giving other alternatives, so crutex has more to choose from.
None.
It can be done within one trigger cycle: grids can be run multiple times per loop, as long as you do it carefully.
Well, I was thinking of lag, as long as he isn't like doing it every trigger cycle it shouldn't be a problem.
None.
If you're not willing to use a coordinate system (which is a bad choice, believe me; it is very simple so set up), then you can either use only mobile grids (grossly ineffective) or just order two cloacked wraiths to move from one unit to the other (where they collide is the middle point; this method is really slow though).
The thing is This is a large map, and would require what 128*2 locations for a 128x128 map? Considering this is a noncritical part of the map, that seems a lot more ineffective than just changing the idea 8)
So you people think that the mobile grid solution described above will work? Would it not require 1 cycle per unit created (due to needing to check where they meet after each unit added)?
None.