True Flying Height

Status
Not open for further replies.
Level 5
Joined
Nov 30, 2012
Messages
200
How do you get the height of a unit off the ground? I am using this:

  • Set temp_Point1 = (Position of Ball)
  • Custom script: set udg_BallHeight = GetLocationZ( udg_temp_Point1 ) + GetUnitFlyHeight( udg_Ball )
But if I set the height of the ball via Animation - Change Unit Flying Height, the game outputs that the height of the unit is what I set it to, not anything in between. For example, if I set the height to 1000 at 100, it will return 1000 5 seconds in, when it should be 500 on level ground.

Does anyone know the solution to this problem? Thank you.
 
I think I found a work-around to my problem. Set the height of the unit to a variable. Also set the height change rate to a variable. When you set the height of the unit, do not set it to the final value. Set it to (Height) + (Height Change Rate) at (Height Change Rate).
 
Status
Not open for further replies.
Back
Top