• 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.

[General] Store gold/lumber in a unit

Level 28
Joined
Dec 3, 2020
Messages
971
I was wondering, is there a way to make a worker such as a Peasant return either Gold or Lumber to a unit (for example a Pack Horse) and instead of the Player gaining gold/lumber, that gold/lumber will be stored inside said unit (Pack Horse)?

Then onto my next point, can I make it so the Pack Horse can only have a maximum storage capacity of 250 Gold and 250 Lumber (or 500 total resources, so it can be only 500 Gold or only 500 Lumber or 100 Gold and 400 Lumber or vice versa, but each one having a limit for each resource is also fine if easier to make; 300 Gold and 200 Lumber for example).
After that the workers will not be able to return any gold/lumber to the pack horse if its storage is full.
Then the pack horse will be able to return the resources to a Town Hall (although if it's not possible since the Pack Horse never actually gathered the resources itself, it can be an ability that only works when within X units of a Town Hall (let's say 300).

After the pack horse returns the resources, its storage will be 0 again for each resource (or 0 total resources if it has a max storage of 500 for both gold and lumber instead of 250 for each).
 
Last edited:
Level 12
Joined
Jul 5, 2014
Messages
551
Technically, you should be able to make a unit a return point with the return gold and lumber ability. But your idea is a big tricky. You could try setting up a trigger that removes acquired gold and lumber, and when that happens, it gets replaced by an item that holds the value of the resources. The pack animal can have the unit inventory where the gold a lumber piles, and after reaching the limit, a trigger removes that "return gold and lumber" ability.

Then, you can make a trigger that if a pack animal gets to x range of a town hall, it gets back the ability, the items get removed and the player receives their value. However, it kinda seems a nuance to set it up, due to the small amounts of resources that the animal receives from the peasants.
 
Top