Staredit Network

Staredit Network -> UMS Assistance -> Which Grid System Should I Use?
Report, edit, etc...Posted by PearS on 2005-03-04 at 01:37:17
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?
Report, edit, etc...Posted by KrAzY on 2005-03-04 at 01:39:26
any smile.gif
Report, edit, etc...Posted by PearS on 2005-03-04 at 01:40:43
Would there be any in particular that would be easier than the rest?
Report, edit, etc...Posted by chuiu on 2005-03-04 at 02:06:30
Are those units owned by the same player? Are the places in the map fixed or constantly moving?
Report, edit, etc...Posted by PearS on 2005-03-04 at 02:12:19
They will all be owned by the same player and they will be preplaced and always in the same spot.
Report, edit, etc...Posted by chuiu on 2005-03-04 at 02:17:37
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.
Report, edit, etc...Posted by Tuxedo Templar on 2005-03-04 at 02:20:18
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.
Report, edit, etc...Posted by PearS on 2005-03-04 at 02:21:03
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.
Report, edit, etc...Posted by Tuxedo Templar on 2005-03-04 at 02:23:31
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).
Report, edit, etc...Posted by PearS on 2005-03-04 at 02:25:58
But I wouldnt use the zergling method would I? I thought that method was used to keep locations around a unit.
Report, edit, etc...Posted by Tuxedo Templar on 2005-03-04 at 02:27:48
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.
Report, edit, etc...Posted by PearS on 2005-03-04 at 02:31:53
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.
Report, edit, etc...Posted by Tuxedo Templar on 2005-03-04 at 19:25:37
(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.
Report, edit, etc...Posted by PearS on 2005-03-04 at 20:16:24
But you have done it correct? It is just really difficult to do. Do you have a map that I can look at?
Report, edit, etc...Posted by Rantent on 2005-03-04 at 20:19:15
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.
Report, edit, etc...Posted by axblader on 2005-03-04 at 20:46:15
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.
Report, edit, etc...Posted by PearS on 2005-03-05 at 01:59:43
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.
Report, edit, etc...Posted by chuiu on 2005-03-05 at 02:17:10
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.
Report, edit, etc...Posted by PearS on 2005-03-05 at 02:31:25
Hmm I didn't consider using more than one burrowable unit. I think i'll do the burrowing unit way. Thanks guys.
Next Page (1)