• 🏆 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] Problem with creating set items

Status
Not open for further replies.
Level 3
Joined
Apr 1, 2017
Messages
47
Whenever a unit drops item, the game creates 2 Ogre clubs. Loosing set part

  • Ogre set
    • 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-type of (Item being manipulated)) Equal to Ogre club (|cff552200Set item|r)
          • ((Hero manipulating item) has an item of type Gauntlets of Ogre Strength +3 (|cff552200Set item|r)) Equal to True
        • Then - Actions
          • Item - Remove (Item carried by (Hero manipulating item) of type Ogre club (|cff552200Set item|r))
          • Item - Create Ogre club (|cff552200Set item|r) 1 at (Position of (Hero manipulating item))
          • Hero - Give (Last created item) to (Hero manipulating item)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Gauntlets of Ogre Strength +3 (|cff552200Set item|r)
              • ((Hero manipulating item) has an item of type Ogre club (|cff552200Set item|r)) Equal to True
            • Then - Actions
              • Item - Remove (Item carried by (Hero manipulating item) of type Ogre club (|cff552200Set item|r))
              • Item - Create Ogre club (|cff552200Set item|r) 1 at (Position of (Hero manipulating item))
              • Hero - Give (Last created item) to (Hero manipulating item)
            • Else - Actions
              • Do nothing
  • Loosing set part
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Ogre club (|cff552200Set item|r) 1
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Item - Create Ogre club (|cff552200Set item|r) at (Position of (Hero manipulating item))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Gauntlets of Ogre Strength +3 (|cff552200Set item|r)
              • ((Hero manipulating item) has an item of type Ogre club (|cff552200Set item|r) 1) Equal to True
            • Then - Actions
              • Item - Remove (Item carried by (Hero manipulating item) of type Ogre club (|cff552200Set item|r) 1)
              • Item - Create Ogre club (|cff552200Set item|r) at (Position of (Hero manipulating item))
              • Hero - Give (Last created item) to (Hero manipulating item)
            • Else - Actions
              • Do nothing
Just so you know Ogre club (|cff552200Set item|r) 1 has a cleave ability
 
Level 3
Joined
Apr 1, 2017
Messages
47
The Hero still has the item, if this event Appears. -> If you remove it here he will lose it again.
Easy solution is Disable Trigger in the first line and at the last Line Enable it again.

The item is no longer duplicates, bus when I drop gauntlets ogre club 1 doesn't become ogre club :/
 
Then you only need to disable and Enable the Trigger inside the then action block of your first if. Inside the Hero losses Item Trigger.

Then Block
  • if
    • (Item-type of (Item being manipulated)) Equal to Ogre club (|cff552200Set item|r) 1
  • Then - Actions
    • Trigger - disable Trigger
    • replace oger club
    • Trigger - enable Trigger
  • Else - Actions
 
Level 12
Joined
Nov 20, 2007
Messages
660
Also remove
page.gif
Do nothing

It only slows down the trigger.
 
Status
Not open for further replies.
Top