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

Need conditon: unit aready has 1 item of type X

Status
Not open for further replies.
Level 5
Joined
Aug 23, 2008
Messages
116
Hi!

I need a condition that asks if a unit already have an item when anoter one is added...

MfG

Cyrax
 
Level 12
Joined
Mar 26, 2005
Messages
790
make it with variables

when hero picked item and item type is blabla, make item1=true


and when he picked another and item type is blabla2, make item2=true,

and if item1=true and item2=true, then make recipe, i think this will work
 
Level 19
Joined
May 1, 2008
Messages
1,130
in the conditions menu > boolean> hero> hero has item of type, but first use the "and" condition and then will be condition1 and condition2 condition1= item type flower1 and condition2= item type flower2

restor i suggest not using variables because they can leak
event: unit aquires an item
condition: hero manipulating item has item of type x1 and hero manipulating item has item of type x2
action: hero: remove item x1
hero: remove item x2
hero: crate "new item" and give it to hero manipulating item
this works perfectly and i don't think it will leak
 
Status
Not open for further replies.
Top