HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How do i find the hight of terrain my unit is walking on

07-10-2003, 08:07 PM#1
COOLer
in my map i have differnt hights in my terren so my camra follows my unit but it it loses it case it gose up to high terrain i cant see its head is there away even in jass?
07-10-2003, 11:56 PM#2
COOLer
Does any one know !
07-11-2003, 12:42 AM#3
DoctorDoom
well if its a single player map then detect camera target z. If it's multiplayer then I need an answer to the very same question.
07-11-2003, 12:54 AM#4
COOLer
would GetTerrainCliffLevelBJ do it?

it works! it sets it to Clif level ! my camra will now go up and down with Hight!

call SetCameraFieldForPlayer( udg_Userplayer, CAMERA_FIELD_ZOFFSET, I2R(( 30 + ( 100 * GetTerrainCliffLevelBJ(GetUnitLoc(udg_HERO[1])) ) )), 0.00 )
07-11-2003, 01:47 AM#5
DoctorDoom
It doesn't seem to work for me. Heres my version of the script.

call SetCameraFieldForPlayer( Player(0), CAMERA_FIELD_ZOFFSET, ( 100 + GetTerrainCliffLevelBJ(GetUnitLoc(gg_unit_hpea_0000)) ), 0.00 )

no errors pop up but it doesn't do anything. When I whent to do a display text: convert to real,

I2R(GetTerrainCliffLevelBJ(GetUnitLoc(gg_unit_hpea_0000))) it just say 2 over and over.

Perhaps I need to use variables only?
07-11-2003, 12:09 PM#6
COOLer
it only works on clif levels so you cant have hills and so forth

and to see any change on camra its self you need to times the cliff level by 10 to 100 this dose not for for negtive clife levels thogh
(( 30 + ( 100 * GetTerrainCliffLevelBJ(GetUnitLoc(udg_HERO[1])) ) )), 0.00 )


Im using TFT on the unliky chance your not thats the problem maybee.

ps. Is this for FPS mod your working on?
07-11-2003, 08:33 PM#7
DoctorDoom
aye, it's for the FPS mod. Two bad about the only working for cliff levels I need it for hills, etc. I'm using TFT myself. So far the only thing I can get working is by locking a camera to a unit and detecting the target z of that camera. A target z of a camera is always at a units feet. But for now it only detect local (current camera) and I need to detect specific cameras z. Working on a script for it. Here's hoping I get a breakthrough or someone else provides one.
07-12-2003, 01:11 PM#8
COOLer
Solved your problem i think

call SetCameraFieldForPlayer( udg_User, CAMERA_FIELD_ZOFFSET, CameraSetupGetFieldSwap(CAMERA_FIELD_ZOFFSET, gg_cam_Camera_001), 0 )

there now you can get the z of any camra you want all you have to do it add numbers too it to get the right z hight for ya! hope that was help full

PS. if you use this in your mod please give me some creadit and if you need a part time trigger I somtimes have some spare time and would love to join your team. my mod is being done by 100% by me so there is no time line lol so ican take some time off.