HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help With GetLocationZ()?

03-14-2005, 01:06 PM#1
Hyarion
I have a unit array: PlayerHero[1-10], and am planning on making a real array CameraZ[1-10], obviously one for each human player. My question is this: Can someone give me the JASS script nessecary to set CameraZ[x] to the height of the terrain under PlayerHero[x], using the GetLocationZ() function? Sorry to be a bother, but I don't know anything about JASS. I was planning a trigger like:

Event:
Every 0.05 Seconds of Game Time
Conditions:
Actions:
Player- Pick every player in all players controlled by a (user) player and do (Set (CameraZ[Player Number Of (Picked Player)] to {Custom Script Here}

But I don't know if that'll work. All I want is to set the CameraZ for a picked player to the height of the terrain under the PlayerHero for that player. NOT using the terrain cliff heights, using the GetLocationZ() function.

Please help...
03-14-2005, 09:11 PM#2
Vexorian
custom script : set udg_RealVar = GetLocationZ( udg_PointVar)

will save the height of location PointVar on the real variable RealVar