- Joined
- Dec 9, 2007
- Messages
- 3,096
To the Get Handle ID part, I can only give a handle variable.
Is there any way to convert an unit to a handle?
Is there any way to convert an unit to a handle?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
So... if this does what i think it does... it can be used as a save system for orpg maps? O.ô
The major advantages of the hashtables are:
1) no limit on the index, arrays are limited to a max of 8190.
2) it's two dimensional
3) you can get the handle Id of most any object.
4) If your not sure where your value is stored in a array, using a hash tables can bring you straight to it.
5) For GUI Easier To get MUI Functions.
how do you set "keys"? when I try to use the hashtable and pick the preset key is looks for some handle variable, then I try to create a handle variable but I can only set it to another handle variable..... I don't kinda understand, but take note that I haven't tried to proceed from there...
Hashtable - Save 10.00 as 0 of (Key (Target unit of ability being cast)) in hashTable
Reinstalling what ?! :S
I've now been told that the GUI hashtables doesn't work with Newgen :S
Is that true ?![]()
Ok, that tutorial is Really helpful!! Thanks to the creater! (+rep)
But I have 2 questions:
1. WE Unlimited does not support hastables and does not load a map with these functions. Is there a version of WEU that does support them ?
2. Edit: Figured it out.
There is one thing i don't get it. RemainingTime is global var. So if i cast a 2nd healing over time within 10seconds. the 1st unit who benefit from it will get have its Healing over time reset to 10? Since storing the hashtable value to a global var which is 10 and it will reset the condition. Correct me if i am wrong.
how about remove leak in 1.24. coz removelocation didnt work at 1.24 i think
I have an problem, i can't get that handle ID like picked unit or target unit of ability being cast.
I don't know if this will work but you can try extracting the UI folder from war3patch.mpq and placing it in your warcraft folder.
This should update your GUI functions and such.
As for an updated TESH, download horus. It's just a lame name for an updated TESH.
Initialize Tree Revival Hashtable

Events


Map initialization

Conditions

Actions


Hashtable - Create a hashtable


Set TreeRevivalHashtable = (Last created hashtable)


Destructible - Pick every destructible in (Entire map) and do (Actions)



Loop - Actions




Hashtable - Save 0 as (Key tree counter) of (Key (Picked destructible)) in TreeRevivalHashtable
Tree Revival

Events


Time - Every 3.00 seconds of game time

Conditions

Actions


Set EntireMap = (Entire map)


Destructible - Pick every destructible in EntireMap and do (Actions)



Loop - Actions




Set TreeRevivalLocation = (Position of (Picked destructible))




Set TreeRevivalGroup = (Units within 300.00 of TreeRevivalLocation matching (((Matching unit) is alive) Equal to True))




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Number of units in TreeRevivalGroup) Equal to 0






((Picked destructible) is dead) Equal to True





Then - Actions






Custom script: call RemoveLocation(udg_TreeRevivalLocation)






Custom script: call DestroyGroup(udg_TreeRevivalGroup)






Hashtable - Save ((Load (Key tree counter) of (Key (Picked destructible)) from TreeRevivalHashtable) + 3) as (Key tree counter) of (Key (Picked unit)) in TreeRevivalHashtable






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Load (Key tree counter) of (Key (Picked destructible)) from TreeRevivalHashtable) Greater than TIME INTERVAL OF TREE REVIVAL







Then - Actions








Destructible - Resurrect (Picked destructible) with (Max life of (Picked destructible)) life and Show birth animation








Hashtable - Save 0 as (Key tree counter) of (Key (Picked destructible)) in TreeRevivalHashtable







Else - Actions





Else - Actions






Custom script: call RemoveLocation(udg_TreeRevivalLocation)






Custom script: call DestroyGroup(udg_TreeRevivalGroup)


Custom script: call RemoveRect(udg_EntireMap)
Couldn't you do the exact same thing with:
Every 3 minutes of game time
custom script set bj want destroy group = true
pick every destructible matching, type equal to tree and matching, condition boolean:: dead equal to true
replace picked destructible with tree living.
