• 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 to add attachment when a unit upgrades – attachment is only for you

Status
Not open for further replies.
Level 6
Joined
Dec 24, 2012
Messages
187
How to add attachment when a unit upgrades .
i tried this and it worked !
  • Steam Shield
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Steam Shield
    • Actions
      • Unit Group - Pick every unit in (Units of type |c00FFFF00Builder|r) and do (Actions)
        • Loop - Actions
          • Unit - Add Steam Shield to (Picked unit)
but when we test it, when we upgrade one "Upgrades", all builders will wear it..
i want that, the one who upgrades the "Upgrades" is the only one who can wear it..
i tried to find the (Owner of (Picked Unit)) on the Action, but i can't find it.
What will i do ? :ogre_icwydt:
 
Level 6
Joined
Dec 24, 2012
Messages
187
Just an attempt but remove Unit group and simply place this trigger:

  • Unit - Add Steam Shield to (Researching unit)
This would as far as I know give the ability to the specific unit that researched the upgrade.

Hmmm.. it doesn't work, the attachment attach to the building ..

i will explain this map,


this is a TD map..
every players contains a builder.
and every builder can build a tower, especially the tower named "Delivery Car"
inside the delivery car, are the "Upgrades"..


this trigger is working, but the problem is, when i upgrade an Upgrade, All unit will get the attachment, and i want to do that, only the owner of the one who upgrades can only get the attachment:
  • Steam Shield
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Steam Shield
    • Actions
      • Unit Group - Pick every unit in (Units of type |c00FFFF00Builder|r) and do (Actions)
        • Loop - Actions
          • Unit - Add Steam Shield to (Picked unit)
 
Level 5
Joined
Jan 27, 2014
Messages
164
Research are always player specific.
Once you upgrade an upgrade, all units for the specific player get the benefit.

Then again, if I understand you correctly, you want specific unit to benefit from the upgrade. In this case, you shouldn't use an upgrade.

A workaround is to use abilities. Give the ability to your 'Delivery Car'. Then trigger:
Event
- A unit starts the effect of an ability
Condition
- Ability being cast Equal to Something
Actions
- Unit - Add Steam Shield to (Triggering unit)

Just this simple.
Again, only if I understand you correctly.
 
Status
Not open for further replies.
Top