Detecting the exact item being manipulated

ninjaalamode

New Member
Reaction score
0
When I do something like, "is equal to item being manipulated", it only detects the item's TYPE, and not if it's the EXACT item that is being manipulated (or at least that's the way it seems). Is there any way to detect the exact item being manipulated?

If indeed "is equal to item being manipulated" does detect the exact item, then I'm guessing there's something wrong with my trigger. So if it does detect the exact item, could someone help me out with my trigger? It's supposed to only allow you to carry one item that has the "charged" classification.

Trigger:
  • Offense Limiter
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Charged
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item carried by (Hero manipulating item) in slot 1) Equal to (Item being manipulated)
          • (Item-class of (Item carried by (Hero manipulating item) in slot 1)) Equal to Charged
        • Then - Actions
          • Game - Display to (All players) the text: 1
          • Do nothing
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item carried by (Hero manipulating item) in slot 2) Equal to (Item being manipulated)
              • (Item-class of (Item carried by (Hero manipulating item) in slot 2)) Equal to Charged
            • Then - Actions
              • Game - Display to (All players) the text: 2
              • Do nothing
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Item carried by (Hero manipulating item) in slot 3) Equal to (Item being manipulated)
                  • (Item-class of (Item carried by (Hero manipulating item) in slot 3)) Equal to Charged
                • Then - Actions
                  • Game - Display to (All players) the text: 3
                  • Do nothing
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Item carried by (Hero manipulating item) in slot 4) Equal to (Item being manipulated)
                      • (Item-class of (Item carried by (Hero manipulating item) in slot 4)) Equal to Charged
                    • Then - Actions
                      • Do nothing
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Item carried by (Hero manipulating item) in slot 5) Equal to (Item being manipulated)
                          • (Item-class of (Item carried by (Hero manipulating item) in slot 5)) Equal to Charged
                        • Then - Actions
                          • Do nothing
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Item carried by (Hero manipulating item) in slot 6) Equal to (Item being manipulated)
                              • (Item-class of (Item carried by (Hero manipulating item) in slot 6)) Equal to Charged
                            • Then - Actions
                              • Do nothing
                            • Else - Actions
                              • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: You may only have o...
 

jwallstone

New Member
Reaction score
33
You really don't need all the Item class = to Charged. You've already filtered it out in the beginning. My guess is that when the event fires, the Item has not technically been placed into a slot yet (it might happen after the event), so detecting if it's the item in the slot might not work. It's quite easy to test if this is the case. When this trigger runs, just add six lines to display the name of item in each slot to the player. It'll be obvious then if the item is added before or after the event

If my guess is correct, you can just add a small Wait and then do the checks, though I would advise storing all the needed information (the hero and the item) into local variables just to be safe.

EDIT: The display functions:
Trigger:
  • Game: Display to (All Players) the text: (Name of (Item carried by Hero in slot N))

where N will be 1 through 6
 

ninjaalamode

New Member
Reaction score
0
Thanks for the help, but, after looking at it again, I realized I had totally messed up. I wasn't thinking straight when I first made it, but now I redid it and it's working.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top