Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: coordinates with 3 locations
coordinates with 3 locations
Mar 26 2008, 8:02 am
By: The_Underscore  

Mar 26 2008, 8:02 am The_Underscore Post #1



This is a system I came up with to determine the coordinates of unit using 3 locations. For most people, it would generally be easier to just preplace locations and not bother with all this, but for those rpg makers who are stretched for locations, you could have every place the hero(s) can walk on and every spawn, spell effect or whatever handled by about 3 locations.

Basically I used mobile grids to measure the distance between the unit and the edge of a given area. X and Y are done seperately. For X, have use a 3x3 devourer grid starting on the player, removing some devs then moving the location onto the next dev, then removing the rest of them. this allows the location to move one devourer width left or right each time. Have as many copies of the trigger as there are possible coordinates each time the trigger repeats , add or subtract one from a variable (in my demo map i used resources so you can see the coords, use death counters if you need more or need them hidden). Having the condition that the location hasnt reached the side allows this to only repeat as many times as is needed to reach the side, giving the distance. Do the same either upwards or downwards for the Y coordinate.

You can then use the X-Y coordinates as conditions for triggers.

As well as this, you can use these moving grids to move a location to a specific place. First have a fixed starting point at one of the corners. Then set variables (death counters are best) corresponding to the x-y coordinates you want to move it to, then have a repeating trigger, same idea as before. Each repeat subtracts one from the variable. Do the X first, the the Y starting from the endpoint of the X movement.

One important note is that these coordinates don't correspond to the gridsquares (devourers are about 1 1/3 squares in size), so you'll need a little trial and error to find the coordinates of any particular thing, such as a beacon.

Dear God. That was the worst explaining I've ever done in my life. If you don't get it, look at the attached map. If you still dont get it, ask.

I'm sure theres a few other things you could do, such as finding the position of one unit relative to another or doing it all with one location by having burrowed units or something instead of locations for the edges (1 location for the whole map would be kinda cool i guess), but I cbf doing that right now.

Oh and don't worry about the lines of vision coming out of him, thats just because i was careless and had the units in the grid owned by the player, just have them owned by a computer player and that wouldn't happen.

Attachments:
mobile grid coordinates.scx
Hits: 5 Size: 50.83kb



None.

Mar 26 2008, 3:08 pm Ahli Post #2

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

You can do it with 2 locations, too ('static start location' and the 'mobile location').
You can do it with 1 location, too ('anywhere' as a static start location and the 'mobile location').




Mar 26 2008, 6:57 pm Demented Shaman Post #3



The idea of x and y counters to represent coordinates for conditions is not new, and there are many ways to implement and get the coordinates as well.



None.

Mar 26 2008, 8:49 pm LoveLess Post #4

Let me show you how to hump without making love.

Quote from devilesk
The idea of x and y counters to represent coordinates for conditions is not new, and there are many ways to implement and get the coordinates as well.




None.

Mar 26 2008, 9:59 pm Falkoner Post #5



Quote
The idea of x and y counters to represent coordinates for conditions is not new, and there are many ways to implement and get the coordinates as well.

Yeah, but was it done using mobile grids before?



None.

Mar 26 2008, 10:36 pm The_Underscore Post #6



Quote from Ahli
You can do it with 2 locations, too ('static start location' and the 'mobile location').
You can do it with 1 location, too ('anywhere' as a static start location and the 'mobile location').
That only works for placing things at specific locations, not for detecting coordinates.

Quote from devilesk
The idea of x and y counters to represent coordinates for conditions is not new, and there are many ways to implement and get the coordinates as well.
I'm aware of that, seeing one of them, which used a different location for each X and each Y value (so he had 127x127 taking all but 4 locations) made me want to do it better. The point of my way is to do everything with less locations, which I understand is something of a goal for rpg makers. When I've got time, i'll redo it properly and with only 1 location for the whole thing.



None.

Mar 26 2008, 10:47 pm Falkoner Post #7



Well, with most RPGs you don't need to save on locations THAT badly, there is 254 of them to use..



None.

Mar 26 2008, 11:14 pm Demented Shaman Post #8



Quote from Falkoner
Quote
The idea of x and y counters to represent coordinates for conditions is not new, and there are many ways to implement and get the coordinates as well.

Yeah, but was it done using mobile grids before?
I'm sure it has been. As I said, there are many implementations of coordinates.

Also, if you're strictly going for obtaining coordinates, Shmidley has done it with just two locations.



None.

Mar 26 2008, 11:17 pm Falkoner Post #9



Quote
I'm sure it has been. As I said, there are many implementations of coordinates.

Well, I don't recall any, so this helped me.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06: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.
[06: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
[06: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?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Roy