|
Master of 239.242 D1 Items
|
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. ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
Anonymoose DELIVERS.
|
-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. ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
|
Anonymoose DELIVERS.
|
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. ![]() ![]() ![]() ![]() ![]() ![]() 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 |
|
Anonymoose DELIVERS.
|
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. ![]() ![]() ![]() ![]() ![]() ![]() 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 |
|
Master of 239.242 D1 Items
|
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: 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. ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
Write your own destiny, or else someone will write it for you!
|
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. ![]() ![]() ![]() ![]() ![]() ![]() ![]() http://sonsofwar.pyrom.net/index.html___0% 100% |