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

Status
Not open for further replies.
Level 2
Joined
Apr 28, 2011
Messages
15
[Solved] Items

How could I do trigger that would destroy/drop item if u pick 2 of the same type.
Also how to do saving system?
Thats what i done so far.

  • Melee Initialization
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-class of (Picked item)) Equal to (Item-class of (Item carried by (Triggering unit) in slot (Size of inventory for (Triggering unit))))
          • (Unit-type of (Triggering unit)) Equal to Paladin
        • Then - Actions
          • Item - Remove (Picked item)
        • Else - Actions
          • Do nothing
 
Last edited:
Level 15
Joined
Sep 27, 2009
Messages
669
I think this trigger could work, but it's for every item in ur map...
  • Drop
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to SWORD
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type SWORD) Equal to True
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
        • Else - Actions
 
Level 2
Joined
Apr 28, 2011
Messages
15
so will that work for only like 1 item or all items?
cause i would love to like that u can have only 1 item of each class like weapons or stuff like that
 
Level 2
Joined
Apr 28, 2011
Messages
15
and how to get that second condition cant find it anywhere.
found it :p
and link please?
didnt work it drops any item that is velens dagger or what ever i putted instead of sword
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
  • Drop
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type SWORD) Equal to True
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type SWORD) Equal to True
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
        • Else - Actions
You copy the if like this.
 
Level 2
Joined
Apr 28, 2011
Messages
15
got working but only for some time after i pick one item of class it drops any other of the same class but if i drop every item i cant get that item back

  • Untitled Trigger 001
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to (Item-class of itemo)
    • Actions
      • Hero - Drop (Item being manipulated) from (Hero manipulating item)
  • Untitled Trigger 002
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • Set itemo = (Item being manipulated)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
This system will prevent you from having the same item
Not same item-class
Like Sword = Weapon | Dagger = Weapon | Both of them can't be on the same unit (NO, MY SYSTEM IS NOT LIKE THIS)

My system works like:
You have 1 Blades of Attack
You take another Blades of Attack which makes that unit now has 2 current Blades of Attack, right ?
It will destroy both of them for having the same item

Simple Explanation:
Item A > 1 = Destroy all Item Type of Item A for the unit
 

Attachments

  • Simple Prevent Same Item System.w3x
    13.1 KB · Views: 79
Level 2
Joined
Apr 28, 2011
Messages
15
at ur map it deletes both if i take 2 daggers they both get dis appeared....

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ItemCount Greater than 1
    • Then - Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Drop (Item being manipulated) from (Triggering unit)
    • Else - Actions
got it working by chanig last line to drop and only item manupulated and do i have to give credits from my map?
 
Level 2
Joined
Apr 28, 2011
Messages
15
yes but got it working
e:ty
e2: and how i modify this to my own items?
e3: anyone know how to do like when he gets sword it is seen at his hand and stuff
 
Level 2
Joined
Apr 28, 2011
Messages
15
so id have to copy that about 100 times and but each one another items?
e: and if i put there like 2 different items with same class i can wear them so how can i make ths work on my own items
 
Level 2
Joined
Apr 28, 2011
Messages
15
still having problems with gettting it work is there way to do like system that drops items that i pick that are same class?
got it working thanks kobas great ids system.
 
Last edited:
Status
Not open for further replies.
Top