How can i detect building unit via triggers?
I don't mean the structure a unit builds, I need to detect unit that has builded a structure...
Tnx in advance
It's because human and undead workers are annoying to detect, but i've to agree about the usefulness, even if you can build any building independent of the worker's race, you will still have an hidden solo worker like the elves and orc, and so quite useless for TD or kind of games.Hmm... maybe it would be but without human or undead i don't think it can be of much use =(
Tnx anyway
store the unit that is selected through my way and then link to him AFTER the building is contructed...
In other words, if its a human type building (there around the building and building it) then add the unit doing the order into a unit group.
Then when building finishes construction select all units say 150 away from constructed unit that are part of the group. Then add your trigger stuff!
No you can't the construction can be stopped, but the event won't fire.crap xD
btw,i didn't even bother removing it and it can be done with event unit cancels construction... i just need to make better variables =P
Simply no.
First, build orders are only point order.
Second, you never remove the unit of the group if she get an other order, and when the unit get the order doesn't mean, the building is starting yet.
Simply forget this idea, live with that, there is no good way to detect human and undead workers.
I bet 10 000 dollars that you won't have a good solution (good means accurate and working in all cases without any error).That gives me an Idea that for sure will be it!!!
I need to go now but what I will do is come back later and try to have a solution. I say that everything is possible (xept for a lot of local variables and a couple other things) with GUI and I know that there has to be a solution (it may be a REAL LONG thing) for this!
and you said the building gets exp?well the base idea is to give the building one EXp,
Event
Unit is issued order
Condition
Order = build or repair or whatever it is you want.
unit is not in unit group called "exp_gainers"
Action
Add unit to unit group called "exp_gainers"
Event
Every 1 sec
Condition
Action
Pick every unit "Exp_Gainers"
Add 10 exp to unit
Event
Unit is issued order
Condition
Issued order not equal to build/repair
Put all of your other orders that you want here and yada yada.
Action
Remove unit from unit group exp_gainers