• 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.

Detecting height of a point

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I want to make it so a unit going up hill will move slower than a unit going down hill. I need to be able to detect the height of terrain at some point. Nothing in the regular editor seems to allow that; does anyone know:

1). is there a condition in the regular editor that allows me to determine whether one point is higher than another? (not higher as in "y-axis", but higher as in "z-axis", i.e. up in the air)

2). is there anything in WE Unlimited that allows for this?

Thank you,

Darwin
 
Level 14
Joined
Aug 30, 2004
Messages
909
there is a GetLocationZ(location loc) in jass

Hmm... I'm afraid I don't know any JASS. Could you should me how to get that location for a unit variable an array? In other words, how would I store that Z location in a real variable array using a unit in an arry as a reference. In other words:

Flier[1] is a unit somewhere on the map.

I would like to store the Z-axis of his location into a real array called: Height[1]

Sorry to make you work for it...but all I know of JASS is the custom scripts for removing leaks.
 
Level 5
Joined
Mar 22, 2009
Messages
172
  • Set myloc = (Position of (Triggering unit))
  • Custom script: set udg_Height[0] = GetLocationZ(udg_myloc)
  • Custom script: call RemoveLocation(udg_myloc)
udg_myloc is a location variable you need for this to work. Also, udg_Height[0] is the same as Height[1] in GUI (I think)
Custom script is just jass code.
The RemoveLocation is to remove the leak.
 
Status
Not open for further replies.
Top