I think the problem is, that you mixed percentages and absolute values. You'd want to have
set maxlife = GetUnitState(hero,UNIT_STATE_MAX_LIFE)
set life = GetUnitState(hero,UNIT_STATE_LIFE)+maxlife*.35
call SetUnitState(hero,UNIT_STATE_LIFE,life)
You might want to substitute the...
I would definitely love to see a map were all abilities are available at level 1. But there is a good reason that this is not common.
Why would you want to gain experience for if not for these abilities? So you must invent some other way to spend experience on. For example make most skills...
Except for the hashtable part this won't get any easier I'm afraid.
Instead of a hashtable you should look into some kind of unit attachment system. (for example AutoIndex)
Could it be that you just overlooked these?
But the problem is ofc that these only look good on the original blademaster.
So you will probably need a custom effect to recreate this effect with a different hero.
Yeah sorry for the unprecise statement :o
set udg_hashtable = InitHashtable() // <- this is needed
I refered to it as "call" since InitHashtable is a function. But ofc you're right to say that to use it you need it for "set"ting the variable.
Different idea:
Preplace a maze in the editor
remove it on mapinit while storing the posititions of the towers
in game refill the positions with towers build by the ai player
or you could pregenerate multiple layouts and chose a random one on game start
Try some geometry?
p = Position of tower A
offset = Size of one Tower
(p.x+offset,p.y)
(p.x-offset,p.y)
(p.x,p.y+offset)
(p.x,p.y-offset)
and you have all for spots to build tower B
Then check whether the terrain is buildable and check for distance to the creep path to decide whether...
Yes you can add spells to a Spellbook but it needs some work.
For every spell you might want to add to a specific spellbook you need a dummy ability. This dummy ability must be based upon spellbook and have the same base order as the spellbook where you want to add the spell.
Add the spell to...