• 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] how can i spawn units with gold or lumber held

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I do not think it is possible to spawn units with resources carried in WC3. You would have to make the businesses a mine, give it some gold (small amount when required) and then spawn the transporter without any gold and immediately order him into the business. He should then quickly pick up some gold (think you can alter the time it takes) and then start making his way to the nearest drop-off structure. Since the trigger controls when there gold is added to the business cheating would not be possible (somehow making them work a business like a mine).

An alternative might be to not really have him carry gold but instead pretend he is by using attachments and a trigger system. This would simulate the WC3 gold carry to some degree and since it is trigger operated you could spawn units with such virtual resources held.
 
Level 12
Joined
Mar 13, 2012
Messages
1,121
The workers carrying the gold use the stand gold, etc. animations. They will however only use those animations if they really carry gold. Three possibilities come to my mind.

A) You edit the model that the standard animations are the gold carrying animations

B) You create the workers in a hidden place beforehand and lets them gather a small amount of gold to trigger your desired animations

C) You force the workers constantly to play your desired animations


e: scrap my post, forgot about animation tags. Read Nichilus' post.
 
Last edited:
Level 28
Joined
Sep 26, 2009
Messages
2,520
You can add animation tag via triggers -> "gold" so it plays animations which have the word "gold" in it, same for lumber.
However as Dr.SuperGood wrote, they would only play those animations, they would not carry actual gold, so you would need to trigger it.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
In WC3 when a unit "mines" gold, they get close to the mine, are hidden for a few seconds, then unhidden with the gold animation tag + a flag saying they have x amount of gold.

This process may have a problem if you start hiding and unhiding these units while they are trying to mine the hardcoded way.
 
Level 21
Joined
Mar 2, 2010
Messages
3,069
it could spawn with ghost. that would make it invisible and after it have gathered the resource it can change owner and ghost can be removed. one problem however is that lumber is the resource used by that faction and called money.(they can still mine gold and sell it.)
 
Status
Not open for further replies.
Top