I'm making an rpg where you can talk to every unit on the map. I did this before in an rpg but I ran out of locations super fast. Is there a way I can use one of the grid systems to center loctions on identical units on the map based on their coordinates?
any

Would there be any in particular that would be easier than the rest?
Are those units owned by the same player? Are the places in the map fixed or constantly moving?
They will all be owned by the same player and they will be preplaced and always in the same spot.
Then you can use a unit grid (burrowed units or something else unique) to identify each location and simply give those units to other players to decide which unit the location gets centered to. That would be the best way.
Well one way would be to use my zoning system to make an action when the player's unit goes to a given X and Y coordinate. It's a pain to implement though, as I never did make an easy version of it, so I wouldn't recommend it.
One thing you could do though is to divide the map up into distinct regions (with a location each). While having a 3x3 location follow the player's unit, check when a stationary talkable unit enters it. As long as you use only 1 unit of any type in any given region, you can tell which is talking by what unit is within the 3x3 location, and what region the player is in.
If you plan on having more than one of the same type of unit in a region, then you can simply place a unique number of neutral burrowed units under each talkable unit. As long as they're all more than 3 grid spaces apart from one another, you can tell them apart by counting how many of the burrowed units are in the 3x3 location.
That should solve your problem.
Ok I don't quite understand what you said. Maybe if I tell you my plan then you can clear it up a bit for me. I plan to use about 20-30 loctaions to put over npcs that you talk to in towns and houses and such. I will place them on all the people in the first town, then when the player gets to the second town, I will set a switch and move the 20-30 locations to people in the second town.
That could work too, as long as you can predict how many are in each town location (and if there's no more in a given town than the number of locations you have left available to use).
But I wouldnt use the zergling method would I? I thought that method was used to keep locations around a unit.
Zergling method? If you mean burrowed zerglings under the talkable units, you could use that too. As long as you set a unique number of burrowed units under each talkable unit of the same type within each town location (so you can tell them apart), then you can save the 20-30 locations you would otherwise use for the above method. Read my topmost post.
Oh wow I totally missed that post. Hmm your zoning method seems like what i need. But. You said that the action happens when the player brings a unit to the coordinates as in one square. If i did that, would I be able to make that coordinate the square the talkable unit is on, or whould i have to make that coordinate every immediate square AROUND the talkable unit. If it is the ladder then that would cost way too many strings. But if it is the first one, I think it will be worth going through the trouble because I am very concerned about locations.
Oh and btw the Zergling method I was talking about was the thing that Chu said.
(Hard to give help when people don't bother reading it.)
All zoning does is find the X and Y coordinates of a unit, and then you make your own triggers to produce an effect when they equal certain values. The tricky part is implementing the position finding.
But you have done it correct? It is just really difficult to do. Do you have a map that I can look at?
If they were different units in towns, you could easily just use a bring command, and put a location over the town. I am using this method in an rpg I'm making and it uses very little locations.
just put a location over ur dude. when the player owning the unit brings it to it, you check the trigger. u can make it random, or fixed, using the zergling thingy.
With 30 being an average of people that are talkable in a city, i'd hit the unit limit by the second town by putting burrowed zerglings beneath the people. I'll probably do this zoning thing but I don't quite understand it.
9 Burrowed units for 30 people per town. You wouldn't hit the unit limit. Just go 9, then 2 of each making another nine, then 2 of each in different combinations (like instead of 2 hydralisks, go 1 hydralisk 1 zergling) for a multiple amount of possible combinations. At most you would have to use 51 units per town if you had 30 talkable units in every one of them.
If you want an example of his zoning system go look for a locked topic labled zoning in the concepts thread. It's probably in the 2nd or 3rd page by now.
Hmm I didn't consider using more than one burrowable unit. I think i'll do the burrowing unit way. Thanks guys.