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

What should I do here?

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733

@ 26 mins flat my human dies, and at that point a trigger runs that changes all the buildings to a dead type of building that rewards less bounty to the opposing team.


I'm wondering, do I have to make separate buildings of each building type to make them look transparent? Or can I somehow alter properties to a building via trigger?

Right now I'm changing the building to hostile but can't find a way to alter the transparency. So just wondering if my only solution is create an entire building group that are all transparent. Thanks.
 
Level 13
Joined
May 10, 2009
Messages
868
You are looking for the animation action type. There's a function there where you can change a unit's transparency. Combine it with a Unit Group, and you should probably have the desired effect.

  • Animation - Change YOUR_UNIT's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
 
Level 12
Joined
Dec 2, 2016
Messages
733
Thanks, I forgot to ask. Can you change the bounty of a building via trigger?

And if that's not possible ^

Can I set a trigger to take away 25% of a buildings bounty when destroyed?
 
Last edited:
Level 12
Joined
Dec 2, 2016
Messages
733
Not that I know of, or rather that I would recommend.

One can trigger the bounty mechanics. When the unit dies give some gold amount to owner of killing unit, if it fulfils the bounty requirements.

Ok, so I guess what I'll do is. Detect what the building is, and if lets say it's a 20g building. Deduct owners gold = owners gold - 75% of the total. Or do you think it would be better to have no bounty on any buildings and do it manually?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Deduct owners gold = owners gold - 75% of the total. Or do you think it would be better to have no bounty on any buildings and do it manually?
I am not even sure what you mean by manually. Bounties are fixed amount of gold generated when a unit is killed, it does not remove any gold from the owner of the dying unit that gave bounty.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
One can do that.

If there are a lot of unit types that need such a mapping one can use a hashtable with parent key being unit type and child key being a constant as hash tables can perform such value lookups a lot faster than even a binary search tree of if statements. This is technically a faster way of doing it, but I doubt performance is a problem at your stage of development so both ways should work fine.
 
Status
Not open for further replies.
Top