| 11-20-2003, 03:17 PM | #1 |
I'm stumped on this one. Basically, I'd like to know if a flying unit lands on flat ground or lands on elevated terrain. Unfortunately, all of the conditionals that seem to be close are restricted to X and Y (Distance between points expressedly ignores height, Region checks are only for X and Y). The only condition that's even close is Camera target Z: Code:
Camera - Lock camera target for Player 1 (Red) to Goliath (Walking) 0011 <gen>, offset by (0.00, 0.00) using Default rotation Leaderboard - Change the value for Player 1 (Red) in HeightBoard to (Integer((Target Z of current camera view))) Camera - Reset camera for Player 1 (Red) to standard game-view over 0.00 seconds This basically generates gibberish numbers from 4-10. It does tend to be lower when on the "ground" than while either in the air or on elevated terrain, but it's by no means discrete. Any suggestions? |
| 11-20-2003, 04:32 PM | #2 |
I have this same problem - couldn't figure any way around it. Except for "target Z of current camera" and "source Z of current camera" there's no way to get the Z value of ANYTHING. In addition, the Z value isn't relative to the ground level; it's absolute. So even if you could find the Z value of a unit using the "lock camera to target, then find Z value of target" method, it wouldn't tell you how far off the ground the unit is... |
| 11-20-2003, 05:08 PM | #3 |
One thing I wanna try later today is creating a camera object at ground level, and locking it for a neutral player (so that none of the human players) get their field of view goofed up). There is a means of checking the angle of attack; perhaps if the unit is above ground level, and you lock the target, that would give a value you could at least approximate height off of ground with? I'll keep you posted. Any other ideas are very welcome. |
| 11-20-2003, 05:16 PM | #4 |
Although not quite accurate, you could estimate with the get cliff level function. |
| 11-20-2003, 07:51 PM | #5 |
That'll work out ok; I just needed a binary "Is at ground level" checker anyhoo. Thanks, Technetium! |
