• 🏆 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!

Drop Item Condition

Status
Not open for further replies.
Level 4
Joined
Jun 11, 2009
Messages
23
hmm.. i ran into a "Drop Item Condition" problem..

The only event that can get a dropped item it the "A unit loses an item"..
but it also activates when a trigger removes the Item.. is there some kind of condition that only activates when the unit dies/drop or drops the item?

Current Trigger:
Code:
Dropped Flag
    Events
        Unit - A unit Loses an item
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Red Flag
                           Then - Actions
                Game - Display to (All players) the text: (Player_Colors[(Player number of (Owner of (Triggering unit)))] + ((Name of (Owner of (Triggering unit))) + (|r  + has dropped: |c00ff0303Red Flag|r)))
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Item-type of (Item being manipulated)) Equal to Blue Flag
                    Then - Actions
                Game - Display to (All players) the text: (Player_Colors[(Player number of (Owner of (Triggering unit)))] + ((Name of (Owner of (Triggering unit))) + (|r  + has dropped: |c00ff0303Blue Flag|r)))
            Else - Actions
 
Level 9
Joined
Dec 6, 2007
Messages
233
What if you saved a short lived boolean value via hash to the unit when you remove the item, then force the other trigger to check if the unit has that value, and not activate if it does?
 
Level 9
Joined
Dec 6, 2007
Messages
233
You said that the issue is when a trigger removes the item, the other trigger starts. Just make it so that one the other trigger can't activate on an item thats been removed via trigger. You do this by saving a value to the unit that held the item, and make the other trigger not activate if that value = whatever. The shortly afterwards, remove the value for MUI purposes etc.
 
Status
Not open for further replies.
Top