| 10-31-2006, 11:30 AM | #1 |
What exactly are handle vars? How can I use them in trigger codes and what do they do? + rep to anyone who can explain this to me thoroughly |
| 10-31-2006, 11:33 AM | #2 |
Considering that there are several tutorials that explain EXACTLY what they are and how they can be used, anyone that spends time writing a thorough post to answer this question would be a dimwit. Try the tutorials section. |
| 10-31-2006, 11:36 AM | #3 | |||
Handle Variables Quote:
Quote:
|
| 10-31-2006, 10:42 PM | #4 |
Thanks for the reply dusk :), yes I am a dimwit ;P |
| 11-01-2006, 01:33 AM | #5 |
Simplifieng what wealdarr said, H2I just converts any handle (i.e. any variable that isnt an integer,real,boolean,string) into a unique ID. You then store a value using the unique id as a label and then retrieve it the same way. The reason why H2I is needed in JASS is before it was invented there was no way to make multi-instancable scripts. Multi-instancable scripts are scripts that aren't instant and because they aren't instant they can be run in multiple instance (i.e. while you have have one instance of the script going another one starts). What is required when making multi-instancable scripts are also local variables. The reason why you need local variables is every time a function stores information in a local variable its is allocated in a DIFFERENT section in the memory, where as with a global it is stored in the same section of memory (over-riding anything that was there before). However since local variables are unique for each function, when you do something like use a timer which requires another function there was no way to transfer variables from the original function to the timer without using globals. This is where H2I came in, you could convert the timer into a unique code, store information under that code so when the function needs the information it retrieves the variables from the timer. This is also multi-instancable because everytime the script is a called a NEW timer is created so it makes a NEW unique id Hopefully this will increase your understanding of the H2I bug |
| 11-01-2006, 12:41 PM | #6 |
handle vars are integer variables that respresent a point to the memory block of something |
| 11-02-2006, 11:04 PM | #7 |
yes but that info i useless for a person trying to learn jass because they dont understand how to use it |
| 11-04-2006, 03:22 AM | #8 | |
Quote:
It is not useless, it explains what handle type casting is. |
