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

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