HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How Identify Widget Type ?

03-16-2005, 10:03 PM#1
Jackyquah
I got trigger with
Event Issue Order Target Order

how do I know the target is unit or destructible or item ?
03-16-2005, 10:06 PM#2
Azhag
Is the catagory under "Units" or "Descrucables"?
If its under units, then it will be units.
03-16-2005, 10:30 PM#3
Jackyquah
What do you mean by Category ???

it's unit event - issued target order

what I mean is how can I know the Target is a unit or a destructible ?
03-16-2005, 10:35 PM#4
Azhag
If your issuing a unit to attack another unit, it won't attack a destrucable. The only way the unit will attack the destrucable, is if you order it to...
Sry bout the confusion....
03-16-2005, 10:46 PM#5
Jackyquah
sorry my english is so bad, still don't understand,
I will make my question simple.

How can I know the type of widget ( Unit , Item or destructible ) ?
03-17-2005, 07:39 AM#6
Strategy Master
???

are u using triggers are have u been using jass.

If u r using triggers the event action should have what it refers to i.e unit, item, destructible.

U don't need any condition to check if its a unit, item or destructible as event has done that for u.
03-17-2005, 12:07 PM#7
Jackyquah
I am using trigger,

I mean, isn't that event is fired every time unit got target(widget, wheter it's a unit, item or destructructible) order ?
how do I know it's only fired if it's a unit or to destructible target only ?

example :
I have trigger with that event.
with action :
set udg_TLoc =GetUnitLoc( 'TargetUnit' )
"then Move other unit to udg_TLoc"

what happen if the target is not a unit ?

"Sorry, I couldn't get the right syntax, since my computer is only P2 350Mhz, couldn't run WE and Internet Explore same time, my computer couldn't handle it. I just give the logic"
03-17-2005, 01:31 PM#8
Strategy Master
well in this case i don't think anything would happen as ur trigger only uses target unit and so actions but i suppose it would still fire on objects and move some unit to location possibly.

U could add boolean condition just in case.

(Target unit of issued order) Not Equal to No unit

That way only if its a unit will actions run
03-17-2005, 01:40 PM#9
Jackyquah
(Target unit of issued order) Not Equal to No unit

thanx, I will try to used this condition. +1 rep
03-17-2005, 02:05 PM#10
Tommi
This is essentially the same as what you tried already. Generally, you can determine the type of the OrderTarget by using the following natives:

Code:
constant native GetOrderTarget () returns widget

constant native GetOrderTargetDestructable () returns destructable
constant native GetOrderTargetUnit () returns unit
constant native GetOrderTargetItem () returns item
Check which ones are null and which one is set.