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

Changeing "Targeted as"-Field of a unit with Triggers

Status
Not open for further replies.
Level 1
Joined
Jan 31, 2020
Messages
3
Hey Guys!

I have found a trigger-action named "Unit - Set Unit: (Triggering unit)'s Integer Field: Targeted as('utar') to Value: x"

Now i am wondering which integervalue i have to choose, when i (for example) want to let a unit getting targeted as a hero too.

Its an idea i got to solve a problem i have. (Maybe you have another solution.)
There are towers which can buff units with Heal,Armor,DMG. (PyroTD-like)
The max amout of Hp, Armor and DMG a unit-type can get buffed, can be incresed by an research which increases a global variable. I have made the units Invulnerable if they got healed to max hp(researched HP limit). And i have made the DMG and armor towers able to attack invulnerable units. Now i dont know how to make the DMG tower to stop attacking a unit which reached the maximum DMG.

My idea now was to add to the full dmg units "targeted as"-field to hero and make DMG towers allow to attack only non-heros. So they should stop attacking the unit if it reaches the max DMG.
 
Status
Not open for further replies.
Top