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!
i know how to make them have more wood overall, but I want where instead of +5 a certain rare tree can give +15, making them faster to harvest. Got any ideas on how to achieve this?
i know how to make them have more wood overall, but I want where instead of +5 a certain rare tree can give +15, making them faster to harvest. Got any ideas on how to achieve this?
Custom Resource System v1.30 You are no longer limited to gold and lumber. This system expand resources to unlimited number. All custom resources are based on human lumber harvesting. I made this system as a reply to UmbraUnda request. Requirements: GUI Unit Event v2.4.0.0 Order Ids Player...
www.hiveworkshop.com
The breakdown:
Limitations:
1) You cannot detect when a unit adds Lumber to their "Lumber Harvest" ability.
2) You cannot detect when a tree is damaged, at least using standard Events.
3) Wisps may require special care since they harvest Lumber differently than the other 3 races.
Possible solutions:
1) You should be able to figure out when a unit starts harvesting using Orders. I imagine the above linked system uses this method. From there you may be able to detect when a Tree that is being harvested loses life since this occurs when a Peasants/Peon/Ghoul attacks the tree (harvests from it). You'll need to account for Siege units that can damage and destroy trees.
2) Maybe use Timers in combination with #1 to determine how long a Unit has been harvesting.
I would use a Unit Indexer or Hashtable to link the worker to the tree it's harvesting.
Set Variable CV = (Custom value of your worker)
Set Variable Worker_Tree[CV] = (The tree it has begun harvesting)
If the tree is a special rare tree then Set Variable Worker_Extra_Lumber[CV] = 5
You can detect when a unit is issued an order targetting an object, and then check that object's type - let's say Tree A and Tree B. If the target is Tree Type A, then Add a more efficient harvesting ability to the unit and remove the old one. If it's Type B do that but in reverse. Seems to work.
The only issue I can see is when a unit changes the type of tree mid-harvest. In that scenario they lose the lumber they have already harvested from the type of tree previously harvested - but I think you could check when a tree dies and order the unit to either return the resources or to look for the nearest tree of the same type.
Edit: I also tried SetUnitAbilityIntegerField and those natives but they seemed to have no effect on the Lumber Harvesting.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.