• 🏆 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] my trigger does a little extra. can you fix it.

Status
Not open for further replies.
Level 8
Joined
Nov 21, 2008
Messages
316
for my trigger. after a unit drops a weapon, it returns to the the orgininal type. only problem is the newly created unit still has the weapon tht was dropped. how do i make it so tht item is no longer in the inventory. keep in mind there is already a weapon dropd, and the same type stays in inventory.

who ever attempts to add to it plz make sure tht what ever u add only removes one 1 weapon of tht type from its inventory. not all of tht type.
  • Axe Drop
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Unit-type of (Hero manipulating item)) Equal to Troll Axe Thrower
      • (Item being manipulated) Equal to (Item carried by (Triggering unit) of type |cffff8c00Battle Axe|r)
    • 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 carried by (Triggering unit) in slot (Integer A))) Not equal to |cffff8c00Battle Axe|r
            • Then - Actions
              • Set Items[(Integer A)] = (Item-type of (Item carried by (Triggering unit) in slot (Integer A)))
            • Else - Actions
      • Unit - Replace (Triggering unit) with a Troll Survivor using The old unit's relative life and mana
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • Hero - Create Items[(Integer B)] and give it to (Last replaced unit)
      • Selection - Select (Last replaced unit) for (Owner of (Last replaced unit))
 
Level 4
Joined
Mar 23, 2008
Messages
87
  • 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 carried by (Last replaced unit) in slot (Integer A))) Equal to |cffff8c00Battle Axe|r
          • Then - Actions
            • Item - Remove (Item carried by (Last replaced unit) in slot (Integer A))
            • Custom script: exitwhen true
          • Else - Actions
Untested, but i think it should work.
 
Status
Not open for further replies.
Top