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!
Yes you can use the native below. However do note the results are not deterministic so walkable destructibles and having both Mac and Windows users in the same session can cause an Out of Synchronization game split.
JASS:
native GetLocationZ takes location whichLocation returns real
No because there is no such thing as "GUI custom script". WC3 only works using JASS and GUI compiles to JASS on map save. Even JNGP compiles vJASS to JASS on map save. As such I am afraid all I can do is give you what I already have.
JASS:
set udg_real = GetLocationZ(udg_location)
make a global real called "real" and a global location (I believe GUI calls this "point"?) called "location" and the above line will compile.
How you enter the line is up to you, it could be in a GUI custom script action or within a custom script function, the choice is yours.
Feel free to change variable names to fit your scripting style. Recall that all GUI globals start with the prefix "udg_" followed by their name with any white space (' ') changed to an underscore ('_').
What is important is that you make a note somewhere that this could be a possible de-synchronizations cause in your map when played in multiplayer. If you run into problems with people falling out of synchronization later it is important you can track it down to try and mitigate it to some degree. Many multiplayer maps have successfully used GetLocationZ without issue while some have had issues.
I use it in a top secret singleplayer project ;D I dont know if you ever checked my campaign but what I am currently working on is 1000 times better and more ambitious so dont worry ;D
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.