Similar to how is currently done with VBS2, allow option to use the scripting command FlyInHeight in either AGL or ASL mode.
This will allow the AI to be commanded without worrying about the ground level such as when flying over hills or set in a loiter.