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

Unit consuming resources peridically

Status
Not open for further replies.
Level 2
Joined
May 3, 2014
Messages
17
Hello,
I'm trying to make a DOTA-like map, and I'd like to have a hero that builds buildings in order to produce creeps.

My goal is to make a technological tree, and at the very end, there is a sort of tank.
The problem is: I'd like to have this tank consume a resource (for example: fuel), but I've got no idea on the kind of solution there is.
Is there a way to implement it directly in the unit stats? Or do I have to make a trigger?

Thanks for giving an answer.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
I mean the building builds tank, and tank has fuel.Not sure what you mean by building produce mana thing?
 
Level 2
Joined
May 3, 2014
Messages
17
The tanks would consume the fuel other buildings produce.

Let's take an example: I've got an oil drill and an oil refinery.

The factory will produce a tank, and the tank will peridodically use up 40 Oil to continue working. Otherwise, it would either stop, or be destroyed. I haven't decided...

So, if I take your solution:
Oil derricks and refineries produce mana (named fuel), and the tank will consume it.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
Ok then, also add mana to oil derrecks.

Now both oil derrecks and tanks have fuel(mana).

Then you can add to tank an ability which takes mana from oil derreck.Also add an ability to oil derreck which gives mana to tank if you want.

If you want oil derrecks constantly produce fuel, set mana regen to positive, if not set it to 0.
 
Status
Not open for further replies.
Top