• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Check Lumber Carried

Status
Not open for further replies.
Level 12
Joined
Apr 27, 2008
Messages
1,228
No.

I am pretty sure there isn't.

Only way to do what you want is by creating a custom harvesting system ;)
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
How come? It must be stored in some integer!
Is it also not possible with a little JASS??

Yes it is stored, but we do not have any access to it.

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.

Nope.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
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)?
 
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.

You can, while the attack order is only been given when actualyl ATTACK target, else its smart or something like that ( I forgot it ).

Well and while attacking you check the custom value, if its (YOURLUMBER-1) then you know that that is the last hit.
 
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...

Just checking the way?^^ Then use (Distance * Speed / 1000) and you have the time..
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
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. In any way, you cannot predict the time it takes for him to successfully do one harvest. So you need to find a way to detect when a unit DID harvest wood for SURE. And when you do, you also need to find out the source of this harvest, because you only want to increase the counter when he's NOT harvesting from actual 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.

Well then you make a tree cutting system yourself.

Just make 2 abilities.
One to hit the trigger, one passive like berserk or something.
Fan of knives would be best.

Then you trigger it every second the unit gets a new order or the amoun have reached 10, up to 10 times.

While reaching maximum you change the spell and force the unit to use the other spell to the main struction. After using , remove the custom value and force the unit to go back to the saved tree again. Then do again the countdown, change the spell, order to use on tree and ...^^
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
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??
 
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.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
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?
 
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...
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
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 =)
 
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 =)

Or just eporting blizzard what the hell they did, changing it with the new patch and relax the efficence of the new function GetUnitCarriedLumber().
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
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?
 
Status
Not open for further replies.
Top