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

Item Upgrading

Status
Not open for further replies.
Level 3
Joined
Feb 9, 2014
Messages
39
All right so how do I do this? I know how to combine an item by using triggers and item combinations + recipes. Now my problem is that I don't know how to upgrade items (Like DotA's dagon). I know it's easy to upgrade items, wherein you just need to buy a recipe and stuff. But what if I buy the item which is also an upgrade.

it's like this: item1recipe is shown in the shop. i made a trigger so that when a player buys item1recipe, it removes the recipe and creates item1 for the triggering unit. item1 has upgrades (like dagon, wherein buying the weapon itself also upgrades it). and my problem is that the Recipe is gone whenever you buy item1recipe. that means when i buy item1recipe, I'll just get anothet item1

Short Summary: How do I give an item an Upgrade SYstem like dagon IN WHICH Dagon is a recipe and at the same time an upgrade
 
Level 3
Joined
Feb 9, 2014
Messages
39
But when I try to buy item1, it directly gives me item1lvl3 because I have conditions like : Triggering unit owns item1.

putting it like: Triggering unit owns item 1, Triggering unit owns item1recipe would be impossible since item1recipe gives you item1 directly
 
Level 11
Joined
Dec 19, 2012
Messages
411
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Item-type of (Item being manipulated)) Equal to Your_ItemRecipe
      • Then - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Your_Unit has an item of type Your_Item) Equal to True
            • (Your_Unit has an item of type Your_ItemRecipe) Equal to True
          • Then - Actions
            • Item - Remove (Item being manipulated)
            • Item - Remove (Item carried by Your_Unit of type Your_Item)
            • Hero - Create Your_Item2 and give it to Your_Unit
          • Else - Actions
            • -------- Here will be your remove recipe and create item --------
      • Else - Actions
 
Level 11
Joined
Dec 19, 2012
Messages
411
About this, your probably need loop function to help your count the number of same item using : Item comparison - Item carry by hero in slot (Loop_Integer) equal to Your_Item.
If yes, set Temp_Integer = Temp_Integer + 1. After that need a condition check if Temp_Integer = 2, if yes, mean the unit has 2 same type of item.

Later just do your remove stuff and create item.
 
Level 3
Joined
Feb 9, 2014
Messages
39
About this, your probably need loop function to help your count the number of same item using : Item comparison - Item carry by hero in slot (Loop_Integer) equal to Your_Item.
If yes, set Temp_Integer = Temp_Integer + 1. After that need a condition check if Temp_Integer = 2, if yes, mean the unit has 2 same type of item.

Later just do your remove stuff and create item.

uhm. so can you like provide a sample trigger `cause imma newbie here...
 
Level 11
Joined
Dec 19, 2012
Messages
411
  • For each (Integer Loop_Integer) 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 Your_Unit in slot Loop_Integer) Equal to (Item carried by Your_Unit of type Your_Item)
        • Then - Actions
          • Set Temp_Integer = (Temp_Integer + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer Equal to 2
            • Then - Actions
              • -------- Here is the actions . Mean the hero is checked and has 2 same type of item --------
              • -------- If u wan to check 3 same type of item, just change Temp_Integer to 3 --------
            • Else - Actions
        • Else - Actions
 
Level 3
Joined
Feb 9, 2014
Messages
39
  • For each (Integer Loop_Integer) 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 Your_Unit in slot Loop_Integer) Equal to (Item carried by Your_Unit of type Your_Item)
        • Then - Actions
          • Set Temp_Integer = (Temp_Integer + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Integer Equal to 2
            • Then - Actions
              • -------- Here is the actions . Mean the hero is checked and has 2 same type of item --------
              • -------- If u wan to check 3 same type of item, just change Temp_Integer to 3 --------
            • Else - Actions
        • Else - Actions

Uhm. As Said, I'm a newbie here. I mean, what's that "Temp_Integer", "Loop_Integer" ? Sorry for all of this.
 
Level 11
Joined
Dec 19, 2012
Messages
411
The name wont affect the trigger execute, so just name it whatever you want as long as u know what the variable is used for. You don't need array for those variable ( You just ignore it currently, although it is very useful when making complicated stuff).

There should have an Arithmetic function at top, click the value and at the top will have the integer variables, and select Temp_Integer ( assume u named it Temp_Integer)
 
Level 3
Joined
Feb 9, 2014
Messages
39
Guys. So I got really off topic here and I just couldn't understand what ya'll were saying. I've made a trigger that works. So, it's like this. Event - Unit acquires an item. Condition - Item type of Hell Sword Recipe is owned. Action - Wait 0.05 secs, Item - Remove item of type Hell Sword Recipe, Create Hell Sword Level 1 for triggering unit.

With this trigger, it gives me the recipe for 0.05 secs before it is turned into a Hell Sword Level 1. I thought of this and in Level 2, I just needed to remove the hellsword level 1 after acquiring it via a trigger leaving only the Level 2 hellsword.

Don't worry guys :3 I will credit all of you when it's finished :D
 
Level 3
Joined
Feb 9, 2014
Messages
39
I'll try :3 Well, it really doesn't matter if it comes out late or early as long as the outcome is right :3 Should I Provide my trigger here ? Maybe it would have leaks...
 
Level 3
Joined
Feb 9, 2014
Messages
39
Okay :3 here it is! :3

  • Hell Sword Level 1
    • Events
      • Unit - A unit owned by Player 1 (Red) Acquires an item
      • Unit - A unit owned by Player 2 (Blue) Acquires an item
      • Unit - A unit owned by Player 3 (Teal) Acquires an item
      • Unit - A unit owned by Player 4 (Purple) Acquires an item
      • Unit - A unit owned by Player 5 (Yellow) Acquires an item
      • Unit - A unit owned by Player 6 (Orange) Acquires an item
      • Unit - A unit owned by Player 7 (Green) Acquires an item
      • Unit - A unit owned by Player 8 (Pink) Acquires an item
    • Conditions
      • ((Item carried by (Triggering unit) of type Hell Sword Item) is owned) Equal to True
    • Actions
      • Wait 0.05 seconds
      • Item - Remove (Item carried by (Triggering unit) of type Hell Sword Item)
      • Hero - Create Hell Sword Level 1 and give it to (Triggering unit)
This is for the Hell Sword Level 1

For the hell sword level 2 (and following upgrades) ,

  • Hell Sword Level 2
    • Events
      • Unit - A unit owned by Player 1 (Red) Acquires an item
      • Unit - A unit owned by Player 2 (Blue) Acquires an item
      • Unit - A unit owned by Player 3 (Teal) Acquires an item
      • Unit - A unit owned by Player 4 (Purple) Acquires an item
      • Unit - A unit owned by Player 5 (Yellow) Acquires an item
      • Unit - A unit owned by Player 6 (Orange) Acquires an item
      • Unit - A unit owned by Player 7 (Green) Acquires an item
      • Unit - A unit owned by Player 8 (Pink) Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Item carried by (Triggering unit) of type Hell Sword Item) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Hell Sword Level 1) is owned) Equal to True
        • Then - Actions
          • Item - Remove (Item carried by (Triggering unit) of type Hell Sword Item)
          • Item - Remove (Item carried by (Triggering unit) of type Hell Sword Level 1)
          • Wait 0.05 seconds
          • Item - Remove (Item carried by (Triggering unit) of type Hell Sword Level 1)
          • Hero - Create Hell Sword Level 2 and give it to (Triggering unit)
        • Else - Actions
Please tell me if there is anything wrong with this ^_^
 
Level 11
Joined
Dec 19, 2012
Messages
411
Since your two trigger with same event, mean that both trigger will fire when unit aquired Hell Sword and causing bug.

Delete the Hell Sword Level 1 trigger, and move the condition+actions to Hell Sword Level 2
and place it in Else - Actions.

Btw you could remove the wait action...
 
Level 3
Joined
Feb 9, 2014
Messages
39
Since your two trigger with same event, mean that both trigger will fire when unit aquired Hell Sword and causing bug.

Delete the Hell Sword Level 1 trigger, and move the condition+actions to Hell Sword Level 2
and place it in Else - Actions.

Btw you could remove the wait action...

I tested it out and nothing was wrong. Though I was only using player 1 and I don't know if anything happens to other players. Anyways, how could the two triggers fire when their conditions are different ? o_O Trigger 2 has 2 conditions that needs to be completed, otherwise, it would mean that You're getting HS Level 1
 
Level 11
Joined
Dec 19, 2012
Messages
411
I tested it out and nothing was wrong. Though I was only using player 1 and I don't know if anything happens to other players. Anyways, how could the two triggers fire when their conditions are different ? o_O Trigger 2 has 2 conditions that needs to be completed, otherwise, it would mean that You're getting HS Level 1

Well 2 trigger won't fire at same time. But since the events are same, so both trigger will fire one by one. So its better combine these 2 trigger to prevent any issue, I don't know but you could try buy Hell Sword Level 1 then buy Hell Sword, this probably could cause two trigger fire one by one with fully meet the condition.
 
Status
Not open for further replies.
Top