Item dropped, given to hero, or given to another unit.

ThySpektre

TH.net Regular
Reaction score
10
Hello,

I need what should be asimple trigger, but am having a lot of difficulties with it.

I need a trigger that upon a player losing and item checks to see if:

1. It was dropped on the ground.
2. It was given to another hero.
3. It was given to a non-hero unit.

Any ideas?

Someone had suggested for the test to see if it was on the ground to check if the manipulated item was owned. Unfortunately, this doesn;t work as evidently for the length of the trigger it is still "owned".

ThySpektre
 

SFilip

Gone but not forgotten
Reaction score
634
1. Boolean Comparison -> Item - Item Is Owned -> (<item> is owned) Equal to False
2. and 3. the only way i could think of
Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Picked unit) has <item>) Equal to True
                [COLOR=Red]// Hero - Hero Has Item, note that this will probably also affect normal units[/COLOR]
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is A Hero) Equal to True
                    Then - Actions
                    Else - Actions
            Else - Actions

edit: oh now i've seen
> Unfortunately, this doesn;t work as evidently for the length of the trigger it is still "owned".
AceHart came up with a solution for this. unit - unit loses an item triggers before the unit actually loses it. so as your first action do a 0.01 second wait and you should have no problems.
 

ThySpektre

TH.net Regular
Reaction score
10
SFilip said:
edit: oh now i've seen
> Unfortunately, this doesn;t work as evidently for the length of the trigger it is still "owned".
AceHart came up with a solution for this. unit - unit loses an item triggers before the unit actually loses it. so as your first action do a 0.01 second wait and you should have no problems.

Thanks. Works like a charm!

ThySpektre
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top