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

item replace

Status
Not open for further replies.
Level 4
Joined
Apr 30, 2009
Messages
47
thanks but i wanna move it to back item place
examaple i wanna replace item x with item y
i create item y and give it to hero and delete item x and move item y to place of item x but i dont know set slot to what?
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
thanks but i wanna move it to back item place
examaple i wanna replace item x with item y
i create item y and give it to hero and delete item x and move item y to place of item x but i dont know set slot to what?

just detect item slot of item x
i think you can move item to item,not sure

but u can use integer X actions from 1 to 6
if (your item) is in slot X equal to true
than move (item) to slot X
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
you can use (Integer A) instead,but your own integer N variable would be nice
  • Actions
    • For each (Integer N) from 1 to 6, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Item carried by (YourUnit) in slot N) Equal to (YourItem)
          • Then - Actions
            • (you can delete your item X here)
            • Unit - Order (YourUnit) to move (YourItem)) to inventory slot N
          • Else - Actions
btw
if unti is ordered to move item x in slot y and slot y has item,bot items will be switched
 
Status
Not open for further replies.
Top