• 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 do you make a flying unit's height unaffected by terrain?

Status
Not open for further replies.
Level 8
Joined
Mar 28, 2009
Messages
179
There is no extra option just for this.

Here is my solution:
- Create regions for each terrain-level (I guess you talked about cliffs and their levels, because afaik the small increases and decreases doesn't affect the unit's height)

- Add a trigger which looks similar to this:

Events
- Unit enters region

Conditions
- Region equal to...
AND Triggering unit equal to ...

Actions:
Unit - Set (Triggering Unit)'s height to (Triggering unit)'s height - 30 (should be a good value for terrain cliffs)

Now we need a second trigger:

(pretty similar, but with a "Unit leaves region" event instead of the "entering region" and a "+" instead of a "-" before the 30.

It can be expanded multiple times by adding more regions and using the "Or - Any" option in the conditions.

Hope that helps.
Gaegamel
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Well, that option only works if you have a geometrically shaped terrain (which I really do not recommend) AND you don't use the terrain raise/lower-tool (without it, a terrain can nearly never look any good).

I have to go now, but I'll post a better function in a while (it's JASS, it has to be, but you don't need to do anything - I'll make it completely GUI-understandable).
 
Status
Not open for further replies.
Top