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

[Solved] What does "Item Absorbing Manipulated Item" do ?

Status
Not open for further replies.
Level 19
Joined
Feb 27, 2019
Messages
591
Short question.
How is "Item Absorbing Manipulated Item" used?

Another question.
How do I reference the item used to cast the ability in this trigger while simultaneously referencing "Target item of ability being cast"?

Update: I managed to reference the item and updated the code below. It works since the hero is only allowed to carry 1 item of that type in this map. If it could carry more I wouldnt know how to reference it.

  • Vial Refill
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Vial (Refill Vial)
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Target item of ability being cast)) Equal to Rune of Armor
          • (Item-type of (Target item of ability being cast)) Equal to Rune of Healing
          • (Item-type of (Target item of ability being cast)) Equal to Rune of Speed
    • Actions
      • -------- --------
      • -------- Set Variables --------
      • -------- --------
      • Set VariableSet Int = (Player number of (Triggering player))
      • Set VariableSet ItemRecipe[1] = (Item carried by AllPigsArray[Int] of type Empty Vial)
      • Set VariableSet ItemRecipe[2] = (Target item of ability being cast)
      • -------- --------
      • -------- Check which slot + Remove Item --------
      • -------- --------
      • 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 carried by AllPigsArray[Int] in slot (Integer A)) Equal to ItemRecipe[1]
            • Then - Actions
              • Item - Remove ItemRecipe[1]
              • Set VariableSet TempValue = (Integer A)
              • Custom script: exitwhen true
            • Else - Actions
              • -------- Do Nothing --------
      • -------- --------
      • -------- Check which Rune + Create new Item --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of ItemRecipe[2]) Equal to Rune of Armor
        • Then - Actions
          • Hero - Create Vial of Armor and give it to AllPigsArray[Int]
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of ItemRecipe[2]) Equal to Rune of Healing
            • Then - Actions
              • Hero - Create Vial of Healing and give it to AllPigsArray[Int]
            • Else - Actions
              • Hero - Create Vial of Speed and give it to AllPigsArray[Int]
      • -------- --------
      • -------- Move new Item to slot --------
      • -------- --------
      • Unit - Order AllPigsArray[Int] to move (Last created item) to inventory slot TempValue.
      • Special Effect - Create a special effect attached to the origin of AllPigsArray[Int] using Abilities\Spells\Other\Charm\CharmTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set VariableSet TempPoint = (Position of ItemRecipe[2])
      • Item - Remove ItemRecipe[2]
      • Special Effect - Create a special effect at TempPoint using Objects\Spawnmodels\Other\IllidanFootprint\IllidanWaterSpawnFootPrint.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
Make another trigger that uses the Event "A unit USES an Item". Then store that used Item in a variable that is linked to the user in some way. Then reference this variable in your Vial Refill trigger. Hopefully the Uses Item event fires before the Starts ability Event, if not, you may need to use a 0 second Timer to delay the Actions of the Vial Refill trigger to the next frame.

Never seen/used "Item Absorbing Manipulated Item" before but others have used it: [General] - "A unit Acquires an item" does not work with stacks
 
Last edited:
Level 19
Joined
Feb 27, 2019
Messages
591
Good idea. I get your idea of using 1 or more triggers to set some variables with an index then fire another trigger with a timer. I tested the idea in a slightly different way for testing purposes. I ended up needing to add a 0.00 wait to Vial Refill so that the other trigger had time to set the variable, even though the other trigger is placed above Vial Refill, and then set "Target item of ability being cast" before the wait lest it couldnt be referenced. That item would also have to be removed at that frame to avoid shift clicking. I dont need to use that way now but its good to know how it can be done.

I still couldnt figure out what "Item Absorbing Manipulated Item" does from that thread and those maps, though.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,546
It's used for stacking items with charges. I assume the item that absorbs the manipulated item would be the one that you targeted. So it's the item that ends up with more charges than it had before.

And yeah, Wait 0.00 is undesirable due to the delay when playing online, since Wait 0.00 seconds is actually more like ~0.20 seconds.
 
Level 19
Joined
Feb 27, 2019
Messages
591
I see now. Thanks. Its as you said.

Thanks a lot for pointing out the wait 0.00 seconds flaw aswell. I gather timers remove this issue then?
 
Last edited:
Status
Not open for further replies.
Top