- Joined
- Feb 27, 2019
- Messages
- 912
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.
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:
