Warcraft III resources & community, 2003–2006 · archived

handles and widgets

6 posts
#1

handles and widgets

can anybotdy please explain to me what a handle and a widget are??
#2
handler?

you mean handle.

a handle is ANYTHING that is not a Boolean, String, Integer, Real, or Code

a widget is a HANDLE that is not in the Player ( force, player, etc. ) or Trigger category

( someone correct me if im wrong on the widget )

therefore, any unit is a widget, so we can say

unit u == widget u <--- this will be true if widget u was assigned the same object as unit u

unit u == handle u <--- this will be true if handle u was assigned the same object as unit u

widget u == handle u <--- this will always be true

in Common.j, you can look all this upp

eg. Type Widget extends Handle

etc.
#3
thnx, but i still don't understand...

uhmm ok, I get the thing about handles (not handlers :oops: ) and widgets, but what's with them?? when can they come handy?? What's the best use for them??

It's not just curiousity... I'm making an RPG map and therefore I need complicated triggers for the custom spells and traps and bosses... maybe some of the information you give here save me some time and effort and make me the most thankful person on earth.
#4
Widgets - whats so useful?

1) they are more general

2) heres an example

native UnitDamageTarget takes unit hurter, WIDGET TARGET, etc.

this way, instead of damaging a unit/destructable/etc. you can use the same func to damage a unit OR a destructible, etc.
#5
ahhh that makes sense... thnx

and should I type it always in uppercase?? (just kidding... )
#6
lol... i thought u were ser that stupid at first :D