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

[Trigger] Detecting unit's Z Height

Status
Not open for further replies.
I would do it how I did it, use a dummy unit, make a camara in the WE that is at an angle of like 335-345 and ajust the flying hight of the unit to different values. (For the dummy unit model, be sure to use a projectile, like an arrow)

Then, when a value is just right, like the lowest possible value to get a headshot with, then apply that to your trigger. This worked for me quite well.
 
There aren't any direct natives for finding a unit's height. Do you mean height as in 6 feet tall height or do you mean Z off the ground?

For the second one, you can use:
JASS:
native          GetUnitFlyHeight        takes unit whichUnit returns real
native          GetUnitDefaultFlyHeight         takes unit whichUnit returns real

EDIT: Whoops, I thought this was in the JASS forum for a second. :p
 
Level 12
Joined
Aug 10, 2004
Messages
1,141
I'm not sure if its possible, I don't hve WE up right now but I'm in a similar situation with height

For a Warcraft FPS-which I haven't taken seriously, but still plan on working on it

The Way i'm imagining fixing the problem would be putting the unit in a unit group

Unit casts spell
-Spell Equal to "I got a Big arse gun that I'm shooting... dayum..."
--Detect if unit got hit by Shockwave (Air and Ground) (1 area of effect)
--If then scenario
---If a unit gets hit by shockwave
---And THe Unit is in Unit Group X
-Then-If then scenario
-if- the Z aim of shooter is less then or equal (Head+FLing Height) (If the unit is in that particular group then just writing a value that detects both flying height and size)
-If- the Z aim of shooter is greater then or equa to (Flying height-Feet)

So pretty much your aimer detects both flying height, Top of the head and feet...
Though Your going to have to do it manually since I don't think you can detect real sizes in Warcraft
 
Status
Not open for further replies.
Top