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

[Solved] (GUI,MUI) Item class limit

Status
Not open for further replies.
Level 10
Joined
Nov 24, 2010
Messages
546
Hello everyone,
After some time of trying to make a system what don't allow one unit wear more then one item from each class, I've decided to post problem here beacuse my hope of making it alone has gone.
Basically, I need system then don't allow to wear one unit more then 1 Permanent item, 1 Campaing, 1 Charged, .... just each item class.
Any suggestions/demo map will be +rep and credit awarded.

Information that might help:
- 1 player can't have more then one hero
- I do not use hero backpack or anything like that

Thank you, Palooo3
 
  • Eins
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set Class = (Item-class of (Item being manipulated))
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set Item = (Item carried by (Triggering unit) in slot (Integer A))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of Item) Equal to Class
              • Item Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Game - Display to (All players) the text: You already have an...
            • Else - Actions
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
just a question, why u use item class instead item level?
a bit limited if u use item class when with item level u can do more category

example
if
item level greater or egual 100 and less than 500 then it is armor
item level greater or egual 500 and less than 1000 then it is weapon

etc
 
Level 10
Joined
Nov 24, 2010
Messages
546
Pharaoh_ You system does not work

shadowvzs
I use item level for something else, aswell as item hitpoints.

  • AllreadyHave
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set AH_Class = (Item-class of (Item being manipulated))
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set AH_Item = (Item carried by (Triggering unit) in slot (Integer A))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-class of AH_Item) Equal to AH_Class
              • AH_Item Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You already have it...
            • Else - Actions
Anyone see mistake?

 
Last edited by a moderator:
Level 10
Joined
Nov 24, 2010
Messages
546
This is very strange... sometimes it tell me that I have item of that type, sometimes not, when I move items in my inventory or drop some items then pick them it allows me to pick item that I previously couldn't ... problem is only with Miscellaneous item class.

Well it works but not that great as I expected :(

EDIT:

Skip remainning actions only made it not spamm massage alot. Didn't solve problem I explained while ago
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
This is very strange... sometimes it tell me that I have item of that type, sometimes not, when I move items in my inventory or drop some items then pick them it allows me to pick item that I previously couldn't ... problem is only with Miscellaneous item class.

Well it works but not that great as I expected :(

EDIT:

Skip remainning actions only made it not spamm massage alot. Didn't solve problem I explained while ago

y its seems a bug, i tryed it too, and work well unit i use misce. item like amulet of recall...so try use item level for this and somehow replace that system where u used item elvel before, exxample use variables for that

or just store to variable every item type what u use :p
 
Status
Not open for further replies.
Top