Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: detection of overlapping locations?
detection of overlapping locations?
Oct 27 2007, 8:33 pm
By: Ahli  

Oct 27 2007, 8:33 pm Ahli Post #1

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

Problem: I would like to place a location in a grid where 2 locations (x-line and y-line) overlap.

The only way I can think of would be a fast and cloaked air unit like a wraith that moves along one of these lines (e.g.: y-line) and if it touches the x-line i found the overlapping area. Then I can place a location on that position.
But the detection takes a lot of time and i would prefer an invisible method.

I already thought of a huge mobile grid, but I since there can be air units in that area, that method is not the best solution.

Any better ideas?




Oct 27 2007, 8:48 pm JaFF Post #2



Detect the coordinates of centers of both locations. If you know their size, you have everything you need for some binary countoff'ing. ;)



None.

Oct 27 2007, 9:20 pm NudeRaider Post #3

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

How do you detect coordinates of locations?

But Ahli, when it's for your Kaiser map to have some way to target a random building with an asteroid there are easier ways...




Oct 27 2007, 9:34 pm Oyen Post #4



Perhaps you should give us more information about the map. Are locations x and y randomly centered on different things until they overlap like this:

--- -- [] <location Y
- ---- []
- ---- []
---[][][][][][][][][][][][][] <location X
- ---- []
- ---- []



None.

Oct 27 2007, 9:51 pm Ahli Post #5

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

Quote from Oyen
Perhaps you should give us more information about the map. Are locations x and y randomly centered on different things until they overlap like this:

--- -- [] <location Y
- ---- []
- ---- []
---[][][][][]X[][][][][][][] <location X
- ---- []
- ---- []

Correct. I meand that with x-line and y-line.
I marked the searched area with a X in the quote.
There is a building area and later I want to create an explosion by an asteroid in that area which kills buildings and army units.

Thus I need to get a location in the overlapping area.

@nuderaider
I cannot cycle through the buildings because current unit building progresses will be canceled, if you meant that.




Oct 27 2007, 10:02 pm JaFF Post #6



Quote from NudeRaider
How do you detect coordinates of locations?
-Have 2 locations: one X axis (takes the whole map horizontally, and 1 tile vertically [if you decide to measure your coordinates in tiles]) and one for the Y axis (takes all map vertically and 1 tile horizontally)
-Center the those 2 locations that I talked about above on a unit in your two locations (the ones that overlap) that simply isn't there.

Example:
Center location XFull on Cave-in owned by all players at XOverlap
Center location YFull on Cave-in owned by all players at XOverlap

That way, XFull and YFull will center on XOverlap, since a Cave-in can't exist in-game without crashing it.

After that is done, you give the units that represent the X and Y coordinates on the sides of the map, and scan each coordinate until you hit those given units.

If you want me to be more clear, please ask. :P



None.

Oct 27 2007, 10:06 pm Ahli Post #7

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

I know what you mean, but that is not the way I am searching for.
I'm searching for the opposite of your idea:
I have the 2 locations and try to put a location where they overlap.




Oct 27 2007, 10:31 pm JaFF Post #8



Double post.



None.

Oct 27 2007, 10:31 pm JaFF Post #9



Quote from Ahli
I know what you mean, but that is not the way I am searching for.
I'm searching for the opposite of your idea:
I have the 2 locations and try to put a location where they overlap.
I was replying to NudeRaider.

To put a location where they overlap you must know the coordinates. Once you know the coordinates, it's easy to center a location on there with a location grid system.

Step #1. Detect coordinates of centers of both locations
Step #2. Calculate the overlap point.
Step #3. Center the required location at the calculated coordinates.



None.

Oct 27 2007, 10:35 pm Ahli Post #10

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

@JaFF
how would you do step 3?
That is my problem. Step 1 and 2 are inside my idea.
The coordinates will be random and the 2 overlapping locations will be the x-line and y-line like posted above.
But I need to find the point where they overlap.




Oct 28 2007, 12:25 pm JaFF Post #11



Do you know what a location grid is?

Map 1

You have locations representing your X and Y axis. This way, you can center your location on any point on the map.



None.

Oct 28 2007, 1:35 pm Ahli Post #12

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

Ok, I hope you understand everything reading this.

What do I have:
-an area which can be filled with units, air units, too
-the area looks like this:
Quote
__________
|.............|
|.............|
|.............|
|.............|
|.............|
|.............|
|.............|
|.............|
|.............|
-----------

What do I want:
-placing a location in a random part of this area
-should be fast
-should ignore other air and ground units

My idea to solve this:
1. randomize x and y offset
2. centering a x-line-location on its offset with a mobile grid
3. create a cloaked wraith with the y-offset using a mobile grid and ordering it to fly along his y-offset
4. when the wraith hits the x-line-location (brings): center the final-location on it and remove the wraith
5. doing the actions I wanted to happen there


I think I will use my solution because it will work.




Oct 28 2007, 1:56 pm NudeRaider Post #13

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

OK, here are two solutions that should be quite easy to implement (but not completely invisible):

Method 1:
Have 1 obs the player has not vision to junkyard in the questioned area.
Method 2:
Let this obs patrol along given paths around the area.

For both methods center a location 'target' on the obs as soon as your asteroid event is started and check when there is a building at 'target'. Then make the actions you want there. This "when" may take a while especially if there are only few buildings (thats why a preset path may work better). But since your event is random anyway this shouldn't be much of a problem.

If in this case vision is your problem, you could use map revealers to give vision when needed and switch off vision for the comp players.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: Roy