• 🏆 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!

call GetLocationZ

Status
Not open for further replies.

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
Hello everyone:grin:

I've got a problem with JASS: I don't have skills with it^^
I searched in the forums for a command to set the z height of a unit, but I don't know how to config it correctly.
It would be nice if anyone can post me a command for a "Last created unit" trigger.
A little tutorial for the text between the "( )" (I don't mind the word^^) would be very great, too.



Yours,

Tzi:cool:
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
You do not need JASS for this...
Set the units flying height to what you want and the units z will appear to alter (hills will affect this).

To let you set any units flying height, you need to add the crow or raven form abilities to the unit via triggers or otherwise (only needed once and can be removed imediatl after being added).
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
The problem is, that the unit is directly to a wall. So the unit will fly high.
This is just a temporary solution because I don't know how to create a
"Destructible selection event".
If this problem wouldn't exist, the problem with the flying height wouldn't exist, too^^

My idea was to place a unit behind the doodad that get a low collision.
So, if you want to select the doodad you select the unit behind of that.
It will not look very good, but that was my only idea^^

If you know how to make a Destructible selection event, please tell it to me :D
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
My trigger looks this way


- Set POINTVARIABLE = (Center of AREA)
- Destructible - Create a DESTRUCTIBLE at POINTVARIABLE facing 270.00 with scale 1.00 and variation 0
- Custom Script: call SetDestructableZ(bj_lastCreatedDestructable,110,270,0.5,1)
- Unit - Create 1 UNIT for Player 1 (Red) at (Position of Last created destructible)) facing 270.00 degrees


So I think this is the same idea you posted "haxel96", or is there a difference?


The unit must be hidden for the players, but selectable if this only is possible by this way.
 
Level 9
Joined
Oct 17, 2009
Messages
370
yes :D but a very small :D should look like this
- Set POINTVARIABLE = (Center of AREA)
- Destructible - Create a DESTRUCTIBLE at POINTVARIABLE facing 270.00 with scale 1.00 and variation 0
- Unit - Create 1 UNIT for Player 1 (Red) at POINTVARIABLE facing 270.00 degrees
- Custom Script: call SetDestructableZ(bj_lastCreatedDestructable,110,270,0.5,1)
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
The destructible is still in the air and the unit on the ground^^
In the Unit Editor the unit is forced to go on the ground.
Should it have to make it fly?
The next problem at this point would be, that there must be some units above other units^^
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
You can only make a selection event with units by GUI^^
If I am wrong, please tell me the way how to do it. I haven't found it yet.
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
Um. What? Anything you can do in GUI you can convert to custom script, meaning absolutely nothing that can be done in GUI -cannot- be done in JASS. Especially vJass.

I haven't wrote that anyone have to tell me a JASS solution if the GUI solution doesn't exist^^
Don't read only between the lines ;-)
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
The occlusion is the fading of a doodad if a unit stand behind the doodad.
So the unit cannot get hided for the camera of the player^^

The doodad isn't the problem.

The problem is the UNIT which I cannot place behind the unselectable doodad that the players will select the unit when they want to select the doodad.

This is the only thing I want to know^^

The problem is, as like as I have written this before that the unit stands directly to a nature wall. So if I would make the unit fly by the object editor it will fly very high over the wall to avoid it.
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
Cause I want to make a hero selection without altars or something like that.
I want to make this the way a Beat-em-up-Game makes it.

The camera of the player is bound on the ground in a hole.
The pictures of the heroes are in the air with a little bit distance to the natural wall.

There are 2 groups of pictures: The Race and the Heroes of the Race.

When a player is selecting a picture of a race the pictures of the heroes of the race will be placed.
When a player is selecting a picutre of a hero he can see the hero in 3d in the middle of the groups of pictures.

By pressing the Arrow-Keys he can turn the hero.



The discussion is about a solution for the pictures to get a selection event with them.
I don't know a way to make a selection event with doodads an tryed it with units that will be placed behind the unselectable pictures.
My problem with that was the natural wall that will force flying units to fly very high above it, cause they are avoiding automatically.
The next problem would be the stacking of units on each over: There must be units above other units.



So my idea is out completely.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Well you could give your unit a custom model that is flat and simply has the icon of the associated button. Then you wouldn't need to hide the unit at all, since it would physically be your icon.

You could also use trackables. Trackables require a model path (use a flat model) and detect when the model is clicked and when the cursor runs over it. They have very limited functionality but there are ways of maximizing it.

Are you using images as icons?
 

Tzi

Tzi

Level 4
Joined
Jan 7, 2009
Messages
57
Pharaoh given me a solution in this Thread where I asked for a way to place such pictures^^

Just read.

If you know a solution like this with units it would be perfect :D
 
Status
Not open for further replies.
Top