- Joined
- May 23, 2011
- Messages
- 179
How to make a custom script that would make a unit fly?
call UnitAddAbility(unit, 'Amrf')
call UnitRemoveAbility(unit, 'Amrf')
call SetUnitFlyHeight(unit, <fly height>, 0)
Bribe does the add and remove included in the Custom script?Jass:
call UnitAddAbility(unit, 'Amrf')
call UnitRemoveAbility(unit, 'Amrf')
call SetUnitFlyHeight(unit, <fly height>, 0)
__________________
function ParabolaZ takes real h, real d, real x returns real
return (4 * h / d) * (d - x) * (x / d)
endfunction
//===
set offset = offset + SPEED
call SetUnitX(UNIT, SOURCEX + offset * Cos(angle))
call SetUnitY(UNIT, SOURCEY + offset * Sin(angle))
call SetUnitFlyHeight(UNIT, ParabolaZ(height, distance, offset), 1000)
Alternatively the brilliant "passive morph" technique might be able to
preserve it.
As bribe say,it used the custom script to add the Crow Form ability,and add the flying height of the unit,also you can add the ability to the unit.
Crow Form is a spell that already inside the object editor.
Unit - Add Crow Form to (Triggering unit)
Animation - Change (Triggering unit) flying height to 1000.00 at 0.00
Unit - Remove Crow Form from (Triggering unit)
EDIT: If you don't want use jass,you can use that