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

[General] Help (Item stacking with levels :C)

Status
Not open for further replies.
Level 11
Joined
Oct 31, 2010
Messages
1,057
so my problem is that now i got just spectating's weapon system which allows you to get items if the level of all the items in your inventory is not equal to a certain number. but then i used a item stacking system which also stacks item according to their levels..........

so when the stacked item level is above 10, then the inventory system of just spectating will not work and i can get 2 of two handed weapons because the number is too high

EG , a fish with 10 charges = lvl 10 and a two handed weapon is lvl 2, 2+2+10 = 14 and that is very high so the inventory system cannot detect that O: and allows you to take two of two handed weapons................how do i solve this ?

i think i could use a item stacking system that does not go by the item level but i cant find one O:
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
no its more like

A unit acquires a item

Condition Item type of item being manuplated = pernament
and item level of item being manuplated = lvl 2

If all of your inventory levels add up together equal more then 4 then do you already got a weapon else do nothing

also the witcher's system goes by using item level too :C
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
no its more like

A unit acquires a item

Condition Item type of item being manuplated = pernament
and item level of item being manuplated = lvl 2

If all of your inventory levels add up together equal more then 4 then do you already got a weapon else do nothing

also the witcher's system goes by using item level too :C

so when the item levels added up together, it went to level 14? the fish charges got counted too ? even it's not permanent item type ?
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
yeah....................because the trigger detects every item in the inventory of the hero, does not matter whether which item class it is :C, is there any way to make it count only specific item classeS?
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
yeah, you can do this :

  • One Weapon Only
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • Set ItemLevel = (ItemLevel + 2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ItemLevel Equal to 4
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
        • Else - Actions
  • One Weapon Only Copy
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • Set ItemLevel = (ItemLevel - 2)
 
Last edited:
Level 11
Joined
Oct 31, 2010
Messages
1,057
wait..... let me analyse again.....................

a unit acquires a item

if item being manuplated equals to pernament and item level of item being manuplated equals to level 2 then do set item level = item level + 2 else if item being manuplated equals to pernament and item level of item being manuplated equals to level 1 then do set item level = item level + 2 else do if itemlevel more then 4 then do drop item being manuplated from hero manuplating item else do nothing

O.O it works..... wait let me try in game
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
wait..... let me analyse again.....................

a unit acquires a item

if item being manuplated equals to pernament and item level of item being manuplated equals to level 2 then do set item level = item level + 2 else if item being manuplated equals to pernament and item level of item being manuplated equals to level 1 then do set item level = item level + 2 else do if itemlevel more then 4 then do drop item being manuplated from hero manuplating item else do nothing

O.O it works..... wait let me try in game

lol, how would i understand this ? XDDDDDDDDDDDDDDDDD
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
nah, :3 just for me to analyse what the triggers would be :3

last question will this trigger leak ?

attachment.php
 

Attachments

  • Itemlevel.PNG
    Itemlevel.PNG
    92.8 KB · Views: 230
Level 12
Joined
Sep 11, 2011
Messages
1,176
nah, :3 just for me to analyse what the triggers would be :3

last question will this trigger leak ?

attachment.php

no, why it should leak ? lol, there is no Unit Group, Player Group, Location, etc. :p

and next time please Copy the triggers as text and then use [Trigger*] paste it here [/Trigger*] tags without (*). that way you don't have to bother uploading the image :D

how to copy :
1. right click the title of the trigger
  • item by two venomous
2. select copy as text.

example :

210329-albums5809-picture61919.jpg

3. paste it here using [Trigger*] Your Paste [/Trigger*] without (*)
4. use hidden to make it good looking
Your Paste[/COLOR] [/Trigger*][/Hidden*] without (*).
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
I'm sorry darkzxx, but you should do this also.

when the item is dropped, you should decrease the item level.

this is an example

  • Losing Item
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • Set ItemLevel = (ItemLevel - 2)
so, yours would be like this .

  • Losing Item Copy
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • -------- Weapon --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 1
        • Then - Actions
          • Set ItemLevel = (ItemLevel - 1)
        • Else - Actions
      • -------- Shield --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 2
        • Then - Actions
          • Set ItemLevel = (ItemLevel - 2)
        • Else - Actions
      • -------- Two Handed Weapon --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 3
        • Then - Actions
          • Set ItemLevel = (ItemLevel - 3)
        • Else - Actions
And i want to ask a question :

why do One handed weapon worth 1 level and shield 2 levels ?
that would give the player an ability to equip
1. 2 "One Handed Weapon" and 1 "Shield"
2. 2 "Shield" at once.
3. 4 "One Handed Weapon" at once. :p

and there is another problem. you should put the "ItemLevel greater than 4" inside all the if's (shield, one handed, and two handed), because the If's would only work after you pick another item.

here i fixed your trigger .

  • item by two venomous
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • -------- Shield --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 1
        • Then - Actions
          • Set ItemLevel = (ItemLevel + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ItemLevel Greater than 4
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
            • Else - Actions
        • Else - Actions
      • -------- Weapon --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 2
        • Then - Actions
          • Set ItemLevel = (ItemLevel + 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ItemLevel Greater than 4
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
            • Else - Actions
        • Else - Actions
      • -------- Two Handed Weapon --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item level of (Item being manipulated)) Equal to 3
        • Then - Actions
          • Set ItemLevel = (ItemLevel + 3)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ItemLevel Greater than 4
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
            • Else - Actions
        • Else - Actions
Note : do not put "Do Nothing" if you want to do nothing, the default is already do nothing, so there's no point on putting that.
 
Last edited:
Level 11
Joined
Oct 31, 2010
Messages
1,057
oh :3 thanks for help but i already noticed all that and fixed all of them, i just wrote a simple trigger on top to ask if there was leaks :3
there's no point in putting do nothing but doing it makes the trigger looks nicer and neater (my opinion :3)
 
Status
Not open for further replies.
Top