Is it possible to check to whom Item X belongs?

Opa

New Member
Reaction score
3
Hello,

Is it possible to check to whom Item "Claws of Attack +6" belong to?
For example; If Player 1 tries to give the Item to a Unit controlled by Player 2,
Player 2's Unit drops the Item. He is not able to pick it up either.
 

Jedi

New Member
Reaction score
63
There is already a item owner system at w3, take a look at GUI item actions and Player comparasion > owner of item.
 

Inflicted

Currently inactive
Reaction score
63
random question, it might help, kindof related.

but when you first buy an item from a neutral shop. who is the owner?

does it set it to the person that buys the item or does it remain neutral.

iv never used this kindof system, so im curious.

but yea Opa all i know is that your going to have a condition somewhere that says:
-- (owner of (item being manipulated) is (owner of (hero manipulating item))

but with variables etc, but your idea will revolve around that.

--------

EDIT: okay i tested it. and an undeclared item is automatically clasified as Player 16. (which is Neutral Passive i think)

and there probably are better ways out there, but this is simple and works, i just tested it.

Trigger:
  • Unit - A unit Acquires an item
    • Set Temp_Unit = (Hero manipulating item)
    • Set Temp_Item = (Item being manipulated)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Owner of Temp_Item) Equal to Neutral Passive
      • Then - Actions
        • Item - Change ownership of Temp_Item to (Owner of Temp_Unit) and Retain color
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Owner of Temp_Item) Not equal to (Owner of Temp_Unit)
      • Then - Actions
        • Hero - Drop Temp_Item from Temp_Unit
      • Else - Actions
    • Set Temp_Unit = No unit
    • Set Temp_Item = No item


Variables:
~Temp_Unit - Unit Variable
~Temp_Item - Item Variable
 

Opa

New Member
Reaction score
3
random question, it might help, kindof related.

but when you first buy an item from a neutral shop. who is the owner?

does it set it to the person that buys the item or does it remain neutral.

iv never used this kindof system, so im curious.

but yea Opa all i know is that your going to have a condition somewhere that says:
-- (owner of (item being manipulated) is (owner of (hero manipulating item))

but with variables etc, but your idea will revolve around that.

--------

EDIT: okay i tested it. and an undeclared item is automatically clasified as Player 16. (which is Neutral Passive i think)

and there probably are better ways out there, but this is simple and works, i just tested it.

Trigger:
  • Unit - A unit Acquires an item
    • Set Temp_Unit = (Hero manipulating item)
    • Set Temp_Item = (Item being manipulated)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Owner of Temp_Item) Equal to Neutral Passive
      • Then - Actions
        • Item - Change ownership of Temp_Item to (Owner of Temp_Unit) and Retain color
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Owner of Temp_Item) Not equal to (Owner of Temp_Unit)
      • Then - Actions
        • Hero - Drop Temp_Item from Temp_Unit
      • Else - Actions
    • Set Temp_Unit = No unit
    • Set Temp_Item = No item


Variables:
~Temp_Unit - Unit Variable
~Temp_Item - Item Variable

Simple, but effective.
I thank you, sir.
 
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