• 🏆 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] Dummy expiration triggers 'Unit dies' event

Status
Not open for further replies.
Level 5
Joined
Dec 25, 2018
Messages
110
I have a trigger which triggers whenever unit dies, I made condition
  • (Unit-type of (Dying unit)) Not equal to Dummy
But it still triggers...
Any fix for this?
(Killing player is always detected as player red, even if dummys owner was blue etc)
 
Last edited:
Level 5
Joined
Dec 25, 2018
Messages
110
  • Unit dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
          • (Owner of (Dying unit)) Equal to Player 12 (Brown)
          • (Unit-type of (Dying unit)) Not equal to Dummy
    • Actions
      • Set EndGold[(Player number of (Owner of (Killing unit)))] = (EndGold[(Player number of (Owner of (Killing unit)))] + 8)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DebugIncome Equal to 1
        • Then - Actions
          • Game - Display to Player Group - Player 1 (Red) for 5.00 seconds the text: ((String((Player number of (Owner of (Killing unit))))) + ( + (String(EndRoundGold[(Player number of (Owner of (Killing unit)))]))))
        • Else - Actions
 
Last edited:
Level 9
Joined
Jul 30, 2018
Messages
445
"Or" conditions work like that now if any one of those returns a value true, then the trigger will run. You have to move the (Unit-type of (Dying unit)) Not equal to Dummy out of the "Or" bracket and place it right under "Conditions". That way the conditions will look like:

If ((Unit-type of (Dying unit)) Not equal to Dummy == true) && (((Owner of (Dying unit)) Equal to Player 11 (Dark Green) == true) || ((Owner of (Dying unit)) Equal to Player 12 (Brown) == true))

if that makes sense to you.

In other words, the trigger conditions should look like this:
  • Conditions
    • (Unit-type of (Dying unit)) Not equal to Dummy
    • Or - Any (Conditions) are true
      • Conditions
        • (Owner of (Dying unit)) Equal to Player 11 (Dark Green)
        • (Owner of (Dying unit)) Equal to Player 12 (Brown)
 
Last edited:
Status
Not open for further replies.
Top