HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Changing Ground Units Flying Height

10-07-2007, 06:08 AM#1
The Elite
Introduction
Hello, in this tutorial I will teach you how to change a ground units flying height so that it looks like they are off the ground. It is really quite simple.
Setup
Ok, to set it up ill ask you to create a new map by pressing this button:
Zoom (requires log in)
Just press ok when this comes up
Zoom (requires log in)
Now in the Tool Palette
Zoom (requires log in)
Go to unit palette and place one(1) pesant on your map
Zoom (requires log in)
Now, go into the trigger editor
Zoom (requires log in)
and delete the trigger titled Melee Initialization and create a new trigger
Zoom (requires log in)
and call it Ground Unit Fly.
Add the action
Trigger:
Player - Player 1 (Red) skips a cinematic sequence
This fires whenever Player 1 (Red) presses the Esc key THIS IS JUST FOR TESTING ONLY YOU WILL NEED A DIFFERENT EVENT IN YOUR MAP
We dont need a condition
Add the action
Trigger:
Unit - Add Crow Form to Peasant 0000 <gen>
This is the most important part, this is the magic ability that blizzard gave us that allows us to make ground units fly without this ground units would stay ground units. So without it this trigger wouldnt work
Trigger:
Unit - Remove Crow Form to Peasant 0000 <gen>
This removes Crow Form from our peasant, because why would we want to look at the icon? and dont worry the peasant can still have it's flying height changed
Trigger:
Animation - Change Peasant 0000 <gen> flying height to 400.00 at 100.00
Now this actually changes the pesants flying height so it looks like he's actually off the ground. The first number (400.00) is what height you would like him to go up to and the seconds number (100.00) is what distance per seconds he will go. So in this example he goes to 400.00 height and takes 4 seconds to do it. Because 400.00/100.00 = 4.00.
Trigger:
Wait 4.00 seconds
Just wait 4 seconds before doing the next action
Trigger:
Animation - Change Peasant 0000 <gen> flying height to 0.00 at 100.00
And of course what comes up, must come down, so we make him come back down now.

And that's how you make ground units fly.
Attached Images
File type: png1.png (366 bytes)
File type: png2.png (24.5 KB)
File type: png3.png (46.8 KB)
File type: png4.png (40.3 KB)
File type: png5.png (1.3 KB)
File type: png6.png (478 bytes)
10-09-2007, 12:41 PM#3
teddybear
Nice...learned somthing new :P
10-15-2007, 08:50 AM#4
The Elite
BUMP

thanks for your comments
10-25-2007, 09:38 PM#5
Castlemaster
Good tutorial. You should add that if you want the unit to fly over obstacles, to turn their collision off.
11-02-2007, 08:14 AM#7
Av3n
This explains the rate abit better than me, cause ever since I toyed with it, I never knew what the rate does

+Rep (From a person who ses Jass but never really understanded the flying height trick.)

-Av3n
11-03-2007, 01:29 AM#8
Toink
Rate is how much height you get per second.
11-04-2007, 11:01 AM#9
PitzerMike
Sorry if this is a bit late.
Anyway I guess it's a good guide for beginners.
So I'll approve it.
11-04-2007, 10:26 PM#10
GamesSmash
Thanks, you cleared up something that lots of trigger-making people have been using without explaining.
04-26-2008, 12:09 PM#11
Str1deR
Thanks for this tutorial!
I have a question though. To make the "jumping" unit pass through units and buildings we can turn collision off for the duration of the "jump". But how do we make it go through unpassable terrain (cliffs, rivers, etc.)?
Unit - Add classification of A flying unit to Peasant 0000 <gen>
didn't work (I guess classification has a completely different purpose). I couldn't find anything related in the Object editor to change either.
03-05-2009, 02:53 PM#12
A Dreamer
ok i made a unit jump and removed the crow form ability from it and it did jump perfectly...
When i tested this on a terrain with some cliffs the unit jumped on the cliffs perfectly and i was happy till i mistakely ordered the unit to go to the lowest terrain level (while it was at the highest) and it just walked over the cliffs to it.. The same happened when i ordered the unit to walk from the lowest to the highest terrain level.. So the unit didn't actually lost his lfying ability... how can i make it not ever fly again without me pressing the right button?