• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Several Questions

Status
Not open for further replies.
Level 3
Joined
Nov 5, 2006
Messages
32
Hey um... I have a few questions...

The orientation of my map is a Laser Tag map.

1. How do I make a unit avoid height adjustment with terrain?
Just like in Elimination Tournament, the projectile's height doesn't change with the height of the terrain (unless it's going down), but if it does, it moves smoothly. I want to know how to implement this.

2. How do I detect the difference between hills and cliffs?
I want to be able to make people shoot up hills, down cliffs, but not up cliffs.
___

That's all for now... if you are answering any of the questions in JASS, it's best that you explain every single chunk, because I have this thing where I find simple things quiet hard...
 
Level 15
Joined
Jan 31, 2007
Messages
502
1.
JASS:
native GetLocationZ             takes location whichLocation returns real
I know what you mean. You have to get the difference of the Z values ( old position in relation to the new ) and set the height of the unit. For example you are moving the projectile ( sound like ur going to make a system ) and the old Z was 100 and the new one is 150 - then you would have to decrease units height about 50 because the height of the unit is in relation to the terrain height.

2.
JASS:
native GetTerrainCliffLevel         takes real x, real y returns integer
 
Status
Not open for further replies.
Top