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

Trigger Request About Item

Status
Not open for further replies.
Level 2
Joined
Dec 1, 2013
Messages
21
Anyone who know how to make item that can be change form like at dota.. for the example item is Ring of Balasius. I don't know how they do such as when the item clicked,, it change form, i already done that and it works, but something wrong.. here, for the example, when i put the Item Ring of Balasius at item slot 6 and only that item that i carries, then i clicked it.. the item moved to item slot 1.. how to make it stay at inventory 6, or any inventory slot that i put same position. Example: I put at inventory 2 and when clicked,, stay at slot 2, same as any inventory.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
was a little tricky to think of a solution. But this works.
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink (Item Version)
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- checks for slot the item you used is in --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Kelen's Dagger of Escape
            • Then - Actions
              • Set slot = (Integer A)
            • Else - Actions
      • -------- remove the used item --------
      • Item - Remove (Item carried by (Triggering unit) in slot slot)
      • -------- creates temp items to fill up the inventory --------
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Create Ring of Protection +5 and give it to (Triggering unit)
          • Set tempitems[(Integer B)] = (Last created item)
      • -------- remove the temp item in the slot that the old item was at --------
      • Item - Remove (Item carried by (Triggering unit) in slot slot)
      • -------- give hero the new item --------
      • Hero - Create Orb of Frost and give it to (Triggering unit)
      • -------- cleanup the other items --------
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Item - Remove tempitems[(Integer A)]
edit: I KNEW that action was somewhere. Didnt fint it tho -.-.
  • Unit - Order (Triggering unit) to move (Last created item) to inventory slot 1
edit2: then maybe this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blink (Item Version)
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- checks for slot the item you used is in --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Triggering unit) in slot (Integer A))) Equal to Kelen's Dagger of Escape
            • Then - Actions
              • Set slot = (Integer A)
            • Else - Actions
      • Item - Remove (Item carried by (Triggering unit) in slot slot)
      • Hero - Create Orb of Frost and give it to (Triggering unit)
      • Unit - Order (Triggering unit) to move (Last created item) to inventory slot slot
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
@death, I know you dont like those but theyre faster to use when you make quick examples. Also if everyone else uses your method it wont bug with mine :p

@Leon
I used a random activate item, that item didnt replace itself by deafault so I had to do that with triggers. You cant edit the items if you dont add it with triggers anyway
 
Status
Not open for further replies.
Top