• 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] Produced Food

Status
Not open for further replies.
Level 8
Joined
Aug 13, 2009
Messages
363
Hello,

When you click on a "Farm" (Farm, Orc Burrow, Ziggurat, Moon Well) or a "Town Center" (Town Hall, Great Hall, Necropolis, Tree of Life) it shows an icon that shows the food the building produces. I was wondering if there's a way to show that icon on a unit. For example, my Orc clan race uses Pigs that are trained from the Pig Farm to produce food, rather than buildings. It just looks very odd without the icon on the Pig.

Thanks for any help given, it's appreciated. +rep to those that help.
 

EdgeOfChaos

E

EdgeOfChaos

It can't be done for units, it's hardcoded for buildings that provide food.

You could always a create an ability with the food icon that displays how much they give though.
 
@ OP

You could always a create an ability with the food icon that displays how much they give though.

I believe the above is your best option.
You can hard code the triggers to display the amount when clicked or you could use my item and unit cost system. It can display how much food a unit gives or takes when it is created. So you can easily check how much it takes for that unit and display it. With several units this will be much easier to do than the hard coded triggers.
 
Level 8
Joined
Aug 13, 2009
Messages
363
Shamans, Priests and all other spellcasters have a Caster - Art (or something along that), just change the icon for it, and change it so instead of showing spell names, it shows food amount.

Voilá! Done.

I suppose this is indeed the best that can be done for what I want. Thank you.

Thanks to the rest of you as well, I added rep to all of you.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
I figured out another option that may be of interest. It's in the attached test map. It required a small work around & it requires your pigs to also be targeted as buildings as well as a modified root ability hidden in a spell book (hotkeys deactivated) and a single trigger to unroot units that just finished training.

The units cannot be rerooted nor can the player see that they have the ability to do that.

The peasants & the knights have the root ability in the test map (should be easy to see).

//\\oo//\\

Edited:
Units must be classified as buildings, not targeted as buildings... Just look in the Object editor data to see what was changed.

Edit2:
Damn, I uploaded the wrong test map, fixed now... sorry. Bad map has been removed.
 

Attachments

  • foodtest.w3x
    17.6 KB · Views: 38
Level 8
Joined
Aug 13, 2009
Messages
363
I figured out another option that may be of interest. It's in the attached test map. It required a small work around & it requires your pigs to also be targeted as buildings as well as a modified root ability hidden in a spell book (hotkeys deactivated) and a single trigger to unroot units that just finished training.

The units cannot be rerooted nor can the player see that they have the ability to do that.

The peasants & the knights have the root ability in the test map (should be easy to see).

//\\oo//\\

Edited:
Units must be classified as buildings, not targeted as buildings... Just look in the Object editor data to see what was changed.

Edit2:
Damn, I uploaded the wrong test map, fixed now... sorry. Bad map has been removed.

Haha, that works like a charm. Thank you very much for this, it helps me greatly.
 
Status
Not open for further replies.
Top