• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How to check unit state

Status
Not open for further replies.
Level 8
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