How to detect in which slot is the item i wanna manipulate with?

naughty

New Member
Reaction score
12
As it says in the title i wanna check in which slot is the item i want to manipulate because when i remove that item and i give another item to the unit (for example the unit is not allowed to use it ATM) i want it to look as it is the same item
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Its actions
Item-type compare
i think
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Item-type of (Item carried by (Picked unit) in slot 1)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 2)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 3)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 4)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 5)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 6)) Not equal to Healing Salve
    • Then - Actions
      • Hero - Create Healing Salve and give it to (Picked unit)
    • Else - Actions
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
lol no problem it was a trigger i had ready made in my map
You can use an interger check in a condition?
 

naughty

New Member
Reaction score
12
and one more question..how do i give the unit an item to a specific slot in its inventory?
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Item-type of (Item carried by (Picked unit) in slot 1)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 2)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 3)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 4)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 5)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 6)) Not equal to Healing Salve
    • Then - Actions
      • Hero - Create Healing Salve and give it to (Picked unit)
      • Unit - Order (Picked unit) to move (Last created item) to inventory slot 1
    • Else - Actions

I dont think that your unit will be "picked unit"
 

HydraRancher

Truth begins in lies
Reaction score
197
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Item-type of (Item carried by (Picked unit) in slot 1)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 2)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 3)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 4)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 5)) Not equal to Healing Salve
          • (Item-type of (Item carried by (Picked unit) in slot 6)) Not equal to Healing Salve
    • Then - Actions
      • Hero - Create Healing Salve and give it to (Picked unit)
      • Unit - Order (Picked unit) to move (Last created item) to inventory slot 1
    • Else - Actions

I dont think that your unit will be "picked unit"

This is assuming the first slot is free. Better check every slot which one is free (1 being the highest priority, 6 being the lowest) and moving it there.
 
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