• 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.

How to make a unit fly?

Status
Not open for further replies.
Level 10
Joined
Sep 6, 2007
Messages
440
Hello, I want to know how to make a unit fly while a person casts a spell. It has to do with crow form or something but how exactly? At the end of the spell, the unit must land. :ned:

PS: I think I've posted this in the wrong thread. Could someone (if i posted wrong) move this?
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
well it depends on if you have only one unit that should be flying or more then one, i have a solution for one unit:

store the unit in a variable, i called it <flyer> and create a unit which is excactly the same as the flyer, but change its movement type to flying and set a flying height

  • Events
    • a unit starts the effect of an ability
  • Conditions
    • ability equal to <your ability>
  • Actions
    • replace <flyer> with <changed unit>
    • set <flyer> = last created unit
  • Events
    • a Unit stops casting an ability (or ends the effect of an ability, not quite sure)
  • Conditions
    • ability being cast equal to your ability
    • replace <flyer> with <unchanged unit>
    • set <flyer> last created Unit
is not MUI

if you have more then one unit don't use the variables, but pick every unit of type ... and do replace action instead
 
Level 6
Joined
May 13, 2005
Messages
164
Give the unit that is going to fly the Crow Form ability and then remove it. Use the "Animation - Change (unit)'s flying height to (height) at (rate)" action to change its flying height. However, make sure the Crow Form ability is removed. You dont want your unit to transform into a Storm Crow for no reason.

To return the unit to its initial flying height, use the "Animation - Change (unit)'s flying height to (height) at (rate)" action again. Put height to 0, assuming that it is a land unit.
 
Status
Not open for further replies.
Top