Staredit Network

Staredit Network -> UMS Assistance -> Unit Unplaceable!
Report, edit, etc...Posted by LegacyWeapon on 2004-12-20 at 19:55:25
I've been working on this map for like half a year when I abruptly decided to cancel the project because of this glitch. The problem is, when a unit changes, sometimes the unit is at a cliff or an edge. So the unit is removed and the unit being created doesn't get created because it cannot be placed at a cliff. So I try a different approach. I try to created the unit elsewhere, and move it to the location that it is being "created" at. This doesn't always work either. So now I'm stuck and I don't know what else I can do.
Report, edit, etc...Posted by MapUnprotector on 2004-12-20 at 19:59:31
Um how about you use a location grid, set up a grid on the existing unit and create the new one in one of the points, if its on the wrong one have it like set off a switch and try a different point on the grid
Report, edit, etc...Posted by LegacyWeapon on 2004-12-20 at 20:01:38
The problem with that is the grid might offset it so that it goes up the cliff onto higher terrain.
Report, edit, etc...Posted by chuiu on 2004-12-20 at 20:44:07
If it doesn't initially move, then move the location and the unit to a ... let's call it a "recall" point in the map. A place in the map you know is safe for the unit and isn't too far out of the way. Like if it was an RPG, it would be a town.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-20 at 20:50:33
There are no recall points on my map. I made the original game TaG. Where you run around hitting people and running again. If there were recall points, then it wouldn't be much of a tag, now would it?
Report, edit, etc...Posted by PearS on 2004-12-20 at 21:08:44
How big is the location? If it is like 1x1 or 2x2 then the current unit will be in it and when it is removed there should always be enough room for another unit. If the location is too big that sometimes causes placement problems.
Report, edit, etc...Posted by chuiu on 2004-12-20 at 21:48:03
If a bigger location isn't working then you should try making a grid of locations to cover the map. And if he cant move to the location then he moves to one of the locations of the grid. So he moves to the general area of where he once was at least.
Report, edit, etc...Posted by PearS on 2004-12-20 at 21:50:37
Thats true but what i'm saying is that if the location is sized like 1x1, then it won't be anywhere close to a cliff because it will be perfectly over the unit. So when the current unit is moved away, the location will be positioned where the other unit can come in with no problems.
Report, edit, etc...Posted by terrenblade on 2004-12-21 at 09:47:33
well, you could create the unit then load it into a drop ship, move the drop ship to where the unit needs to spawn and unload the unit, but that's a bit messy. Or you could have the unit that's being replaced be a large unit like an ultralisk, and the replacing unit be something smaller like a firebat. that should fix the problem.

Or you could do something sneeky, like spawning an observer and runing the junkyard dog AI then trying to move the created unit under the observer. eventualy it will get far enugh away from the cliff not to block the move command.
Report, edit, etc...Posted by BeeR_KeG on 2004-12-21 at 09:51:59
Center a big location(5x5) around the unit that you want to be replaced. This way there will always be enough space to put a new unit in there.
If there are obstacles in the location then it will tend to go to the nearest possible middle-most square. it will always choose lower left over upper right so your unit might appear on the other side of the cliff.
Report, edit, etc...Posted by chuiu on 2004-12-21 at 10:28:32
Yeah a second, large location would work. Just make sure they both stay centered with each other which should just happen during your move location trigger anyway.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-21 at 15:32:47
I've tried that, don't you understand? However large the location is, it won't work. If the unit is on the side of a cliff, it wont work.

Why don't you try your input before posting closedeyes.gif

Here, a test map:
[attachmentid=3456]

Shooting the Marine spawns it at the ghost's location.
Shooting the Firebat spawns it at a stalling point then moves it to the ghost's location.

If you set it up like this:[attachmentid=3457]

this is the result:[attachmentid=3458]
Report, edit, etc...Posted by chuiu on 2004-12-21 at 16:01:32
The way you set it up, there is chance for something like that to happen.

Try this map and see if you get the error.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-21 at 16:08:33
laugh.gif LOL what the hell does that have to do with anything...
I want to ghost to turn into a Marine/Firebat when he kills one.
Also, in your map, if you move the firebat to that same spot the ghost was in and kill it, it will cause the same effect.
Report, edit, etc...Posted by chuiu on 2004-12-21 at 16:35:13
I never got the error, and I've tried it more than several times.

Look, I listed two valid solutions. If you can't use either then im done trying to help you. Besides, you're being an ass now and never explained what you were doing clearly untill your last post anyway.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-21 at 16:42:30
2 valid solutions? None of them work...
Actually, I did explain quite clearly what I was trying to do, Replace a unit maybe?
I made that test map and you didn't understand the test map until now, but that isn't my fault. You don't need to understand the test map, you just need to know that a larger location doesn't work (Your first solution). A 'recall' point (Your second solution) I cant have because it's a tag game. And your stupid map that has nothing different than my map (Your third solution?). This is another reason I cancelled the project, people like you can't solve the problem so they blame me and stop trying to help.
Report, edit, etc...Posted by chuiu on 2004-12-21 at 16:49:01
First of all my first solution was the recall point. My second solution was a grid of locations, and this one I see no problem with in a map like yours. Both of these are valid, you just either don't want to use them or haven't tried them out or refuse to try them out. That's your problem.

And you don't go around getting your problems solved by insulting people. You never even tried my grid idea, did you? Never even read it? Bye.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-21 at 17:04:10
QUOTE(Chu @ Dec 21 2004, 04:49 PM)
First of all my first solution was the recall point.  My second solution was a grid of locations, and this one I see no problem with in a map like yours.  Both of these are valid, you just either don't want to use them or haven't tried them out or refuse to try them out.  That's your problem.

And you don't go around getting your problems solved by insulting people.  You never even tried my grid idea, did you?  Never even read it?  Bye.
[right][snapback]113174[/snapback][/right]

http://www.staredit.net/index.php?showtopi...ndpost&p=112774
I already talked about the grid approach.

>Chu locked this but I didn't see a reason to.
Report, edit, etc...Posted by chuiu on 2004-12-21 at 17:23:49
Who said the grid has to be perfectly square? It just has to cover places where units are walking.
Report, edit, etc...Posted by LegacyWeapon on 2004-12-21 at 17:33:13
I mean I have quite a large field, covering that field with locations will take quite some time. This isn't a 20x20 square type field. This is a whole playing arena around 96x96.
Report, edit, etc...Posted by chuiu on 2004-12-21 at 17:40:50
Whoever said making a good map was a fast and simple process is a retard.
Report, edit, etc...Posted by MapUnprotector on 2004-12-21 at 17:46:28
The grid that i suggested might work if you had another set of locations, one set for high ground, other for low and if the current unit going to be replaced is on the low ground then when you replace it check it again to see if its on the low ground, if it is not then have another trig to redo it
Report, edit, etc...Posted by LegacyWeapon on 2004-12-21 at 17:48:07
Whoa! I figured a way with centering the location. I thought, like devilesk said, that the grid might have too much of an offset and cause the unit to go up the terrain. But then I, instead, used scourge and centered location on those. And this will only occur down or to the right or left so I only programmed to do those. Well if you don't understand, check out this tongue.gif

Sorry Chu if you were insulted happy.gif
Please accept my apology blushing.gif
Report, edit, etc...Posted by MapUnprotector on 2004-12-21 at 17:50:01
I never said the unit would go up the terrain, after I posted my suggestion about the grid you said it would go up the terrain, so thats what I assumed it would do afterwards
Report, edit, etc...Posted by Tuxedo Templar on 2004-12-22 at 15:47:21
A relativity grid (square of Overlords/scourges/whatever) would work, if you had a reliable way to tell which direction spaces the unit away from the terrain obstacle in question. It wouldn't work if you were squeezed in against terrain from more than one side or the map's edge, though. Relativity grids don't like map edges.



How about a simpler solution. If the player kills a firebat, cache the firebat and base unit (marine?) in seperate locations. Then test if the firebat can move to the location or not. If the 'move unit' fails, then alert the player of it, restore the marine, and tell the player to move the marine. Center a miniature location over the marine, and when the marine is no longer in that location, retry the steps above until there's no more obstructing terrain. Hopefully the marine won't be blocked from returning to it's old spot either.



In case the marine replace fails, then try this: Have a trail of locations follow the marine (or whatever the current unit is). Each time the marine moves out of the closest following location, recenter the other locations in turn from back to front order on the next one up (center on a unit that you won't expect find in those locations, which translates to centering the location to the direct center of the intended one), and center the front location on the unit itself (since there is no location in front of it to move it up to).

Then, when the test to replace the unit fails, move the front location back a step (reverse of the above listed steps), and retry the replacement. Continue stepping back until you hit the last location, or until the unit successfully replaces.
Next Page (1)