77 posts joined 2006-05-06
#1 2006-05-16
handles and widgets can anybotdy please explain to me what a handle and a widget are??
1,418 posts Here joined 2005-12-14
#2 2006-05-16
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.
77 posts joined 2006-05-06
#3 2006-05-16
thnx, but i still don't understand...
uhmm ok, I get the thing about handles (not handlers
) 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.
1,418 posts Here joined 2005-12-14
#4 2006-05-16
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.
77 posts joined 2006-05-06
#5 2006-05-17
ahhh that makes sense... thnx
and should I type it always in uppercase?? (just kidding... )
1,418 posts Here joined 2005-12-14
#6 2006-05-17
lol... i thought u were ser that stupid at first