HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit at certain terrain level?

12-29-2002, 08:25 AM#1
SilentSpyder
Sup, I've searched the forums, but couldn't find an answer. So my question is. How do I know what terrain height or level a my unit is on? For example if he's on a cliff or shallow water, or just regualur level. Is there a number or something, and if so. What triggers would I use.

The reason is that I want to turn off my unit's collision when he's at an elevated level, so then he could just walk down (with no ramp), but I want his collision on when he's at regualr terrain level (so he can't climb up). Please Help.
12-29-2002, 05:48 PM#2
SilentSpyder
anyone?
12-29-2002, 06:52 PM#3
Ari
~smacks hand on head. Aha! I hadn't known you could turn off collision detection and have units climb cliffs without ramps. Thanks for the heads-up. As for your question, I've been working on this problem too. One solution is to use a region or postion based height. In a map I've created, I had a circular hill, and based height off of the distance from the peak of the hill. In the same vein, you could create a region or series of regions which would signal specific heights.

That's not what you want, though, I suspect. I *think* there's a way to finagle the camera controls to reveal height to you, but I can't quite suss it out just yet. I need a similar function, so rest assured, I'm as interested in giving you an answer as you are in getting it. I'll be back on my normal computer in a few days, but until then, there's not much other help I can give you, I'm afraid.
12-30-2002, 06:35 AM#4
Ari
Well, in a broad sense, target z of current camera seems to at least correlate with a unit's height. It doesn't seem to give exact values though, perhaps because it's taking the average of a wider area than just your unit. I've experimented, though, and even when the field of view is almost zero, and the distance from the camera to the unit is small, the values are *still* only vaguely correlated with height. If your terrain is simple enough, try using a periodic trigger to display that value as you navigate a unit over a particular area to get a sense of how values map onto the map itself. Don't think that's going ot be good enough for you though.

I can't help but get the sense that somebody (maybe the fps people?) has already gotten this problem figured out. Is there some custom text trigger dealing with z axis? Any takers?
12-30-2002, 06:37 PM#5
Vaderman
Were still trying to figure this problem out at the time.........
12-30-2002, 07:08 PM#6
Electromancer
The only way ive ever been able to solve one of these problems is by making a very thin doodad along the edge of the cliff. Just make two regions, one off the cliff and one on, and do a "Unit enters Region x" "Move triggering unit to region y offset by Postion in region x." That offset thing may take a bit of work to do, but when you get it working right it will move the unit to about the same spot it was in the other region.