• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Items Problems!! Help Please?!

Status
Not open for further replies.
Level 14
Joined
Sep 29, 2003
Messages
1,255
How can I make my hero only to wear one item of its kind? lol my english suck!

Forexsampel: My tauren Chieftain finds a item named Cloak of Flame, he pick it up.
Later he finds another item named Cloak of Flame, but he can't pick it up, because he only can wear one item of Cloak of Flames!

So i am only asking for how to make a hero wear one item and not to wear a similar one?

But! he can still wear other items but not the similar one.

PLZ PLZ PLZ PLZ :arrow: HELP HELP HELP HELP!!!! :(
 
Level 1
Joined
Jul 25, 2004
Messages
6
Hmm, try this-

Event: A unit acquires an item.

Conditions:
(Name of (Hero Manipulating item)) equal to Tauren Chieftain
Or any conditions are true:
(Item type of (item being manipulated)) equal to Cloak of Flame

Actions:
set (variable) = (hero manipulating item) (lets call this variable (1))
set (variable) = (item being manipulated) (lets call this variable (2))

For each integer (integer A) from 1 to 6, do Actions
Loop actions:
If all conditions are true then do then actions else do else actions:
IF- or any conditons are true:
(Item type of (item carried by (hero manipulating item) in slot (interger A) equal to Cloak of Flame
THEN- Set (variable) = (variable +1) (lets call this variable (3)) (3) = ((3) +1)
ELSE- do nothing

If all conditions are true then do then actions else do else actions:
IF- (variable)(3) greater than 1
THEN- Hero- drop (variable)(2) from (variable)(1)
ELSE- do nothing

set (variable)(3) = 0


This should work, and if not it should be a good guideline for you. I've used something similar in one of my maps. Oh, good luck understanding my bad explanation. I hope it helps.
 
Status
Not open for further replies.
Top