• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Instantly set Unit Height

Status
Not open for further replies.
Level 26
Joined
Aug 18, 2009
Messages
4,099
Additionally setting it to insanly large values like 10^16 should be instant (rememer the game only updates at 60 frames a second).

Logically though using 0 would be better. Never forget through that if instant is not an option, a large number can suffice.

The game only updates the screen in these intervals but it's doubtful that you can already read the new value in code directly after the action. That depends on whether the specific action waits for the first interval or notices it and cuts it off in the start function.
 
The game only updates the screen in these intervals but it's doubtful that you can already read the new value in code directly after the action. That depends on whether the specific action waits for the first interval or notices it and cuts it off in the start function.

the new flying height is set instantly with that function
change unit flying height to 3600 with speed 1 will be 3600 even if it takes an hour to reach it
the stuff between is just animation
 
Level 26
Joined
Aug 18, 2009
Messages
4,099
the new flying height is set instantly with that function
change unit flying height to 3600 with speed 1 will be 3600 even if it takes an hour to reach it
the stuff between is just animation

Well, we spoke in general. But no, I not only meant the mapmaker (GetUnitFlyHeight) with reading the value. When you start a second SetUnitFlyHeight while the first is still running, the graphic won't begin at the target height of the first call, rather from where it's currently at and even not change the add rate.
 
Status
Not open for further replies.
Top