How come? It must be stored in some integer!
Is it also not possible with a little JASS??
Just do this:
Each time a unit uses an order to a tree add 1 to the custom value to it when the target is NOT a unit. If it is, check if the order is harvest and set it to 0.
I hope this helps.
Well but why not? It should work with that. Check for the unit order, if the order is attack and the target is tree, add 1 to the units custom value.Nope.
Well but why not? It should work with that. Check for the unit order, if the order is attack and the target is tree, add 1 to the units custom value.
If the unit has an order that has a Lumber mill or main structure as target, you simply set it to zero. Thats it.
The Unit is ordered to go harversting one time as with all other orders(i.e attack, the order is not reissued every time the unit attacks, but just when the players(trigger) orders it to do so)?
It works how I did it, and so I can't see whats your problem.
Select your peasant and start spamming the right mouse button on a tree. Oops, your system is broken...
And how do you check if the action is being finished?
But a countdown to what value? If a peasant returns his wood, when the wood is returned he automatically receives the "harvest" order. You can't predict how long it'll take for him to get to the tree.
the order given is "harvest", not "attack". And it's automatically given when a peon has just returned his resources and is heading back to the trees. But you can't predict how long it'll take before the peasant is back at the trees...
That's really a bad way. Your distance is the direct distance (i.e. flying distance), not the total distance the unit needs to walk because of pathing blockers. You're also ignoring "slow" or speed auras, as well as dynamic pathing blockers (i.e. a unit happens to walk in front of him). In fact, that formula will probably fail in 100% of the cases.
Ok, ill explain it further: I tried to make it cost mana: and if the mana is less then max mana, add 1 to custom value, Didnt work =S
I tried a buff,, i didnt know if it would stay on the unit, or just go and come every time it cuts, but i thought it was worth a try,, Didnt work, it didnt even add a buff!!!
Can you guys please tell me what i am doing wrong?
Why does it not destract mana from the unit when i set Mana cost to 1??
Why does it not add a buff when i set a custom buff to the ability??
Because it triggers attack and cancels the spell after doing the effects, meaning the spell is never been used really.
That sucks,, Can you think of any other way to do it?
Maybe adding a classification to it? and delete it when the custom value (which is in this case the lumber) is added?
Is there any way to make the unit not carry the lumber anymore? Like, set the max lumber carried to 1, add the unit to a group, pick every unit in that group, and if picked unit does nothing, add the custom value, set the carried lumber to 0 and order to do again, until the custom value is 10?
It is in the harvest ability, something with: Maximal carried count...
Initial its to 10, decrease it to 1...
Yeah, found that one, but i mean, when it has cut the lumber, it has one lumber in 'inventory' how can i destract that from it?
Think i got it!
Set 10 lvls for harvest, every lvl has one more inventory space, when the peasant is doing nothing anymore, set level to +1 and order to do again, unit it has 10 lumber =)
Read my post again... Go trough it step for stepWhere can i find that function? Do you know it exists? Or are you referring to a whole jass function (a whole Jass 'trigger' )
Like: GetUnitCarriedLumber(udg_LumberUnit) ?
Ok I have said that you can send and EMail to Blizzard where you say
that you miss a function to get a units lumber amount which is currently been carried.
If you have, you only need for Blizzard Patching wc3 and then you can
relax the new function GetCarriedUnitLumber()
You think they will patch whole WC3 just for 1 little function?