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

[Trigger] How to make an item unique?

Status
Not open for further replies.
Level 19
Joined
Aug 24, 2007
Messages
2,888
Event
Unit Aquires item
Conditions
if Aquired item is equal to Unique item
For Each integer From 1 to 6
..loop actions
......if Item in (integer A) slot of Triggering Unit is equal to Unique item
..........then
............if <a custom boolean value you created> is equal to false
.................then
......................set <same custom boolean value you created> to true
.................else
......................Make Triggering Unit drop the Aquired item
......................set <same custom boolean value you created> to false
..........else

Should work
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Untitled Trigger 00.2948
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Skip remaining actions
            • Else - Actions

w00t im second ?
 
Level 6
Joined
Dec 28, 2007
Messages
111
:S

  • Untitled Trigger 00.2948
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Skip remaining actions
            • Else - Actions

w00t im second ?

That would make every unit Unique
 
Level 6
Joined
Dec 28, 2007
Messages
111
:..

Event
Unit Aquires item
Conditions
if Aquired item is equal to Unique item
For Each integer From 1 to 6
..loop actions
......if Item in (integer A) slot of Triggering Unit is equal to Unique item
..........then
............if <a custom boolean value you created> is equal to false
.................then
......................set <same custom boolean value you created> to true
.................else
......................Make Triggering Unit drop the Aquired item
......................set <same custom boolean value you created> to false
..........else

Should work

Ye :) for like one time i think?
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
  • Untitled Trigger 00.2948
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Skip remaining actions
            • Else - Actions

w00t im second ?

wouldnt it drop it in first taking "the second one" ?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Untitled Trigger 2947.42
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • someCondition
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
              • (Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Skip remaining actions
            • Else - Actions
 
Level 6
Joined
Dec 28, 2007
Messages
111
Great solution but this thread is CONFUSING

  • Untitled Trigger 2947.42
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • someCondition
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
              • (Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Skip remaining actions
            • Else - Actions

Great solution but this thread is CONFUSING
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Hmm working solutions isnt enough for him

Then try this
Custom script: ExecuteFunc("DropIfItHasOne")

LOL xD "Untitled Trigger 2947.42"
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Ghost Wolf I think you'll trigger will drop the item when you take first time
Use my way (battle begins)
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Uh sorry I didnt see the second one...
Apologies

And yes This trigger of GhostWolf will %1000000000000000000 work
  • Untitled Trigger 2947.42
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • someCondition
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
              • (Item carried by (Triggering unit) in slot (Integer A)) Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Triggering unit)
              • Skip remaining actions
            • Else - Actions

Repleace someCondition with Item-type of (Item being manipulated)) is equal to <Your Unique item>

If you have more uniques
find OR multiple conditions from conditions
and place your conditions inside it
 
Status
Not open for further replies.
Top