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

How to copy X, Y, Z axis value in the World Editor?

Level 3
Joined
Aug 18, 2018
Messages
13
Hello, I need some help.
When I write some jass codes like CreateUnit(Player(0), 'hfoo', x, y, 270.0), I am trying to fill out the x, y with some constant values. The way I fill out is to pick some x, y axis value from the bottom left of the WE.
xy.png

It is too slow to input these values into jass code manually. Is there any way to copy and paste these values? Thanks!
 
Level 25
Joined
Sep 26, 2009
Messages
2,381
I don't think there is a way to do that.
However if you are for example spawning a group of units in some location, you could just preplace one of the units and create the rest via script using the preplaced unit's position and the 'point with polar offset' function. That way only one location would have constant [x,y], the rest would be calculated.
 
Level 18
Joined
Mar 16, 2008
Messages
721
Hello, I need some help.
When I write some jass codes like CreateUnit(Player(0), 'hfoo', x, y, 270.0), I am trying to fill out the x, y with some constant values. The way I fill out is to pick some x, y axis value from the bottom left of the WE.
View attachment 463962
It is too slow to input these values into jass code manually. Is there any way to copy and paste these values? Thanks!
set those values as a real variable using "unit's real position x" "...y" then reference those variables in the JASS code.
 
Level 3
Joined
Aug 18, 2018
Messages
13
I don't think there is a way to do that.
However if you are for example spawning a group of units in some location, you could just preplace one of the units and create the rest via script using the preplaced unit's position and the 'point with polar offset' function. That way only one location would have constant [x,y], the rest would be calculated.
Thank you for your advice. Actually, I don't need too many units to create. There are only two or three units. I just want to copy x,y values from the WE and simply paste them to the scripts.
 
Level 3
Joined
Aug 18, 2018
Messages
13
set those values as a real variable using "unit's real position x" "...y" then reference those variables in the JASS code.
Thanks for your help. In other words, there is no way, like pressing a shortcut key, to copy x,y values from the WE directly? The only way is to copy them from JASS code?
 
Level 3
Joined
Aug 18, 2018
Messages
13
If its just a few units, why can't you preplace them?
Cuz preplacing unit is not convenient for me to manage my map.
Firstly, it creates numerous ugly variable names like gg_unit_hpea_0001.
Secondly, x,y information is not just for units but also for other things like item, camera position and so on. And they may be placed at the same position next time. What I am focused on is just the x,y.
 
Top