Now updated! Check please with your antivirus.
Later on, I will rewrite this using Java (to be OS-independent, excluding registry part) and probably more modifications will be needed due to Wc3 Reforged possible changes.
Updated a bit:
1) Replaced lua script with Object Merger script
2) Added check for Auto Fly library existence (not sure whether it works)
3) Added functin GetWaterType (detect whether there is no water, shallow water or deep water)
Thanks for your response.
1) Ok, I will remove SetUnitPosition from CreateUnitZ function.
2) Test map is included, destructable can be extracted from there.
3) 'Otip' has very small height (<1 as I remember) and thus system will be able to detect water depth <1. Also, all walkable...
It is possible to create unit or smth outside playable area, therefore world bounds are better to use for that case.
I haven't tested, but I believe that you can create location outside playable area but inside world bounds.
Are function overloads implemented? This is very useful thing.
For those people who don't know what it is:
They are functions with same name but different argument count.
If not, it is not hard to implement them, compiler can check number of arguments in function and add suffix "_N" for example.
I'm not sure where post this thread...
I have an idea - make a petition for creating DestroyTrackable or DestroyHandle on special site and send link and message to blizard, so hopefully they make those functions in next patch.
Chance is low but anyway, it's worth it)
What do you think?
Haha, this is pretty much the same as I did, only the difference was that I have tried only 17th color - game crashed and I thought that the same will be for other values))
This is a lesson for me now - never give up!)
Thanks for pointing out that there is some effects for greater values)
I had similar idea in the past - change texture by changing player color to 16+ and importing that textures with appropriate name. But this did't worked, game crashed when I was setting 16+ color to unit(
Interesting, what result you had?
I have modified model, see attachment. It anyway sticks to everything.
I thought the problem is in matrices but I have looked into Rock Golem model and there is almost the same except that it doesn't stick.
I've attached also reduced Rock Golem model.
Actually, this is that I did)
Now system doesn't require custom model, only custom destructable, which can be easily copied from attached map or generated by included script.
Added "CreateUnitZ" function and documentation.
I moved it to separate trigger.
There are two small problems: if I suggest to put my GetPointZ to that library then there will be two libraries using custom platform model and destructable and GetUnitZ and SetUnitZ work uncorrectly on ground units.
Therefore I have redone that...
Functions require 1 custom destructable.
Object Merger script for generating destructable is inside code, demo map is attached to the post.
library ZLibrary //// by D.O.G. version 2.6 ////
/////////////////// A P I ///////////////////...
System updated from 2.0 to 2.1.
Added more interface options: spacing left and right strings, colors of tab names, timer period, some new functions.
So why this isn't good enought to be approved? This is unique resource anyway)
It works in multiplayer and supports many groups.
I'll keep this...
Nes already have expressed his opinion) Do whatever you want.
This only can be used in simple save-load systems which don't have their own built-in similar function.
By views count you can decide usefulness of this)))
I think this will be useful for synchronization systems because it can replace two reals (coordinates only) by one integer and speed up sync process.
I need to warn that it doesn't return exactly the same coordinates, but they are pretty close to original. On 256x256 map coordinates difference...
Very simple silly question inside:
function Test takes nothing returns nothing
local location p = Location(0.0, 0.0)
do stuff here
set p = null // The question - Do I need this line?