• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Detecting a cancellation

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
Hey fellow hivers,

Quick question; Is there a way to detect if a structure cancels an upgrade?

For instance,
  • Demolish
    • Events
      • Unit - A unit Cancels an upgrade
    • Conditions
    • Actions
      • Set Temp_Unit = (Triggering unit)
      • Set Target = (Owner of Temp_Unit)
      • Unit - Explode Temp_Unit
      • Player - Set Target Current gold to ((Target Current gold) - (Point-value of Temp_Unit))
      • Custom script: set udg_Temp_Unit = null
      • Custom script: set udg_Target = null
My problem arises when Multiple structures have multiple upgrade possibilities.
I need to detect when a player cancels an upgrade I tried doing it by training/cancelling, but I still came up short with trying to detect the cancellation.

Any ideas?
 
Level 9
Joined
Jun 7, 2008
Messages
440
You have to read it. One says upgrade. The other says researched. No dice on the condition :goblin_cry:

There also is no condition that states
  • Conditions
    • (triggering unit) equal to Cancelling unit
 
Level 3
Joined
Nov 16, 2011
Messages
54
I think if the upgrade is queued and it's canceled from the queue the game won't detect it but i am not sure. Blizzard haven't work a lot to expand the editor to be useful for a lot of things. Your best way is when it finish the research it's at least sure that the thing will be detected properly.

Offtopic: Guys i need help i need to create item that have mana regen but not % one like sobi mask. And i need this mana regen to stack with other items of this type. Any ideas what item or ability i can use it need to be stackable?
 
Status
Not open for further replies.
Top