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

How to check unit state

Status
Not open for further replies.
Level 9
Joined
Feb 2, 2013
Messages
97
Hi,

I'm having trouble finding the right condition, that checks the following:
If a control tower upgrades to a canon tower for example, and he gets killed while upgrading and just while upgrading i want to let certain actions happen. But either im to stupid or there is no potion to check that in the editor (what i don't belive). So I tried different ways, for example making a dummy unit while the construction is progressing etc.. but it doesent work the way i planned.

So is there a way to trigger it like this?

TowerOutpostgold
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to (==) Canon Tower
[here is the missing condition that checks if the tower is still in construction/upgrading]
Actions
Player - Add 6000 to (Owner of (Triggering unit)) Aktuelles Gold

Thanks for any help :)

EDIT: Okay i just found another solution for myself, just setting the upgrade status to 100 when units life is at 5% but i have another question, is there any way to remove a non learned ability from a unit?
 
Last edited:
Level 10
Joined
Dec 15, 2012
Messages
650
Test this, this should work ;b
First trigger, pick them first
  • Pick them first
    • Events
      • Unit - A unit Begins an upgrade
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to Unit_Group
Second trigger, remove them from the group
  • Cancel or Finish
    • Events
      • Unit - A unit Cancels construction
      • Unit - A unit Finishes an upgrade
    • Conditions
    • Actions
      • Unit Group - Remove (Triggering unit) from Unit_Group
Third trigger, add your actions here
  • Tower
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is in Unit_Group) Equal to True <-- Find it in Boolean
    • Actions
      • Your actions here......
 
Status
Not open for further replies.
Top