| 12-24-2006, 04:16 AM | #1 |
How do you find the height of a doodad or destructible? I tried this but it didnt work. Trigger: JASS:function Trig_Untitled_Trigger_001_Func001A takes nothing returns nothing set udg_r[1] = GetLocationZ(GetEnumDestructable()) endfunction function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing call EnumDestructablesInRectAll( GetPlayableMapRect(), function Trig_Untitled_Trigger_001_Func001A ) endfunction //=========================================================================== function InitTrig_Untitled_Trigger_001 takes nothing returns nothing set gg_trg_Untitled_Trigger_001 = CreateTrigger( ) call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions ) endfunction Does no one know how to get the height of a doodad or destructible? |
| 12-24-2006, 08:33 PM | #2 |
I think this is the function you're looking for. JASS:native GetDestructableOccluderHeight takes destructable d returns real |
| 12-24-2006, 10:58 PM | #3 | |
Doesn't that have something to do with seeing over trees? Quote:
Ok, I tested it and thats not what I'm looking for. It always returns the same height no matter what height the destructible is at. |
| 12-24-2006, 11:59 PM | #4 |
thats becouse you never change the destructibles occluder height, to do that select destructible and press pg up, or pg down, anyways i dont know how to find the destructibles actualy height. |
| 12-25-2006, 01:27 AM | #5 |
GetLocationZ() takes type location. You passed it a destructable. Store the destructable's location in a variable, get the Z, destroy the location and finally set the var to null if it's local. |
| 12-25-2006, 02:17 AM | #6 | ||
Don't you mean Ctrl + Page Up/Down? Quote:
This don't seem to be working either. Did I do something wrong? It's only showing the height for how high the ground. For example if I place a destructible down on a level 1 terrain (128 points) then raise the destructible with Ctrl + Page Up it's still only showing where it should be and not where it is. If you get my meaning. Trigger: Untitled Trigger 001
![]() Conditions
Quote:
|
| 12-25-2006, 02:30 AM | #7 |
From what I know, you can't get the location (including the Z value) of a destructable, only it's X/Y value. (GetDestructableLoc is a BJ function) |
| 12-25-2006, 02:46 AM | #8 |
You might be able to create a unit on top of the destructable and get its height. Failing that, attach the height at creation. |
| 12-25-2006, 03:50 AM | #9 | |
The unit doesn't get made on top of the destructible. How do I attach the height at creation? Do you mean find the height myself without triggers and put them into a variable or something? Basicly preset the heights in variables; which won't work for what I need. By any chance do you know where the Z point of destructibles are stores in the map file? Quote:
|
| 12-25-2006, 04:01 AM | #10 |
Destructables are all created by the map script, you can find the height when you place them. The world editor should keep track of them in a .doo file. If the height is stored its in the CreateDestructableZ call. |
| 12-25-2006, 04:13 AM | #11 | |
I'm using MPQMaster to view the .doo file but it's compressed. Is there another program I can use? You've lost me a bit. The .doo compressed so I can't read it and I can't find any CreateDestructableZ calls in any of the maps files. Quote:
|
| 12-26-2006, 02:45 AM | #12 |
For creating a unit on top of a destructable, perhaps try making a flying unit without a model that has locust. Create it at the X/Y of the doodad and then check the unit's height, I don't see how that shouldn't work. |
| 12-27-2006, 04:03 AM | #14 |
You'd have to probably create a program to read from it, unless someone else has already done so. |
| 12-27-2006, 04:14 AM | #15 | |
That's where we have a problem. My skills don't go that deep. Aka I can't make programs and I wouldn't know where to start. Quote:
It's looking like I may have to do this by eyesight |
