• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

How to make a custom script to make a unit fly?

Status
Not open for further replies.
Level 13
Joined
Oct 25, 2009
Messages
995
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.
  • 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)
Crow Form is a spell that already inside the object editor.
EDIT: If you don't want use jass,you can use that
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
you need to have distance, height, angle and offset...

distance is the point you want to go
height is oviously the height
offset (should be zero) is the speed where it will reach the distance
angle is angle from loc1 to loc2

then using D4RK G4ND4LF's parabola method, you can jump...
JASS:
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)
 
Level 5
Joined
Sep 1, 2010
Messages
168
Short thing to remember: when a unit is morphed, you need to add&remove crow form again..

Rest is already said by the previous posters..
 
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.
  • 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)
Crow Form is a spell that already inside the object editor.
EDIT: If you don't want use jass,you can use that

That's the trigger in GUI...
 
Status
Not open for further replies.
Top