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

[HELP] Item's Experience and Level

Status
Not open for further replies.
Level 9
Joined
Aug 7, 2009
Messages
380
Hello
Well, i wanna to make a item when a unit type attack and carry it, when attacker kill the attacked unit, the item will have it's experience, when it reaches a number, the item level up.
Example: My hero acquire an item, when i use it (it means use an dummy ability) my hero will remove and replace with another unit type (carrying the item) and when it kill enemy, this item will experience up and level up. Hope you understand, so hard to explain it with my EL :vw_sad::vw_sad::vw_unimpressed:
 
Level 19
Joined
Oct 15, 2008
Messages
3,231
I'm not too sure about whether it works or not, but I'll give it a try:
- You need to create create two separate items first, one named [Item - Level 1] and [Item - Level 2] or anything beyond.
- Make a trigger which condition requires [Unit 1] to {Use [Item - Level 1]}, and the action equal to {Remove [Unit 1]}, {Summon [Unit 2] On Previous [Unit 1] Area}
- Make it Give [Item - Level 2] to [Unit 2] when condition is [Kills a unit].
I only think it's something like that because I don't have a World Editor on this computer at the moment, I hope it helps you though!
 
Here simple triggers:
  • A
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- First we must check if hero has item --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) has an item of type Mask of Death) Equal to True
        • Then - Actions
          • -------- Now we increase item experience --------
          • Set ItemExperience = (ItemExperience + 1)
          • -------- Check experience for level up --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ItemExperience Equal to 10
            • Then - Actions
              • -------- Remove current one --------
              • Hero - Drop (Item carried by (Killing unit) of type Mask of Death) from (Killing unit)
              • Item - Remove (Last dropped item)
              • -------- Add new one --------
              • Hero - Create Crown of Kings +5 and give it to (Killing unit)
            • Else - Actions
        • Else - Actions
  • B
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- First we must check if hero has item --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Killing unit) has an item of type Mask of Death) Equal to True
        • Then - Actions
          • -------- Now we increase item experience --------
          • Set ItemExperience = (ItemExperience + 1)
          • -------- Check experience for level up --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ItemExperience Equal to 10
            • Then - Actions
              • -------- In this case we just level up item ability --------
              • Unit - Set level of Item Life Steal for (Killing unit) to ((Level of Item Life Steal for (Killing unit)) + 1)
            • Else - Actions
        • Else - Actions
If you want this to be MUI and set to effect more levels or items, I suggest you to try to edit one of many item systems out there!
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I'd do it like this, the item level is keyed to the item.

  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killinging unit) has an item of type Claws of Attack +15) Equal to True
    • Actions
      • For each (Integer loopA) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item carried by (Killing unit) in slot loopA)) Equal to Claws of Attack +15
            • Then - Actions
              • Set i1 = (Load (Key level) of (Key (Item carried by (Killing unit) in slot loopA)) from (ItemHash))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • i1 Equal to (9 + 1)
                • Then - Actions
                  • -------- level up --------
                • Else - Actions
              • Hashtable - Save (i1 + 1) as (Key level) of (Key (Item carried by (Killing unit) in slot loopA)) in (ItemHash)
              • Skip remaining actions
            • Else - Actions
So when you kill a unit, the triggers checks every slot for Claws of attack and then levels it up. If the level is 10, the item levels up. The skip remaining actions causes only the first item of the type to be leveled up.
 
Level 29
Joined
Mar 10, 2009
Messages
5,016
Try this...

What it will do?, well, your item will gain/show an experience...i just stopped because i dont know what you want for the level up item...this is just a preview of XP for item...

  • Item Acquire
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
          • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
    • Actions
      • Set Item = (Item being manipulated)
      • Floating Text - Create floating text that reads Acquired Item: above (Hero manipulating item) with Z offset 20.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Create floating text that reads (Name of Item) above (Hero manipulating item) with Z offset -30.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
  • Item Level Up
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Killing unit) has Item) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item carried by (Killing unit) of type (Item-type of Item))) Equal to Claws of Attack +15
        • Then - Actions
          • Set ClawsXP = (ClawsXP + (Hero experience of (Killing unit)))
          • Floating Text - Create floating text that reads Item Experience: above (Killing unit) with Z offset 20.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Floating Text - Create floating text that reads (String(ClawsXP)) above (Killing unit) with Z offset -30.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top