• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] item drop system issue

Status
Not open for further replies.
Level 10
Joined
Feb 27, 2016
Messages
617
so i used a item drop system but it does not work :-( here is the trigger:



  • Item system
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
    • 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
              • ((Hero manipulating item) has (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to True
              • (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
              • (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item-class of (Item being manipulated)) Equal to Permanent
                • Then - Actions
                  • Game - Display to (All players) the text: |cffff0000 you cant...
                  • 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
                      • (Item-class of (Item being manipulated)) Equal to Artifact
                    • Then - Actions
                      • Game - Display to (All players) the text: |cffff0000 you cant...
                      • 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
                          • (Item-class of (Item being manipulated)) Equal to Miscellaneous
                        • Then - Actions
                          • Game - Display to (All players) the text: |cffff0000 you cant...
                          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
                        • Else - Actions
            • Else - Actions
  • [TRIGGER/]
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
You have contraditory conditions.
"((Hero manipulating item) has (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to True"
Which is a check if the hero has the item being manipulated in slot A.
"(Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)"
Which is a check if the item in slot A is not equal to the manipulated item.

Which, ofcourse, can NEVER both result in true.
One is true, the other is false.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
No, you already had those conditions, you simply had to remove one.

Now that I actually take a closer look at it, the first condition is useless. (to an extend)

Can you explain in words what the trigger is supposed to do and what is not working?
(Still you forgot to use [TRIGGER][/TRIGGER] tags.)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
7acad4fff3eb46a689e84851cdd001bdd2aab0b8e11dd39b32a8eab12ca86ffd.jpg


You create a trigger for a reason.
WHAT THE HECK IS THAT REASON?!

If there is no reason for that trigger to exist, then remove it, problem solved.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
"it is an Item-Drop-system Read title"
No shit.

"and it will prevent the player to equip 2 items from the same class"
That is what we need to hear.

You have to loop over all items in your inventory and check if
- the item being manipulated is not the item in slot A
- the item class of the item being manipulated is equal to the class of the item in slot A

No other checks.
 
Status
Not open for further replies.
Top