| 07-24-2008, 09:38 PM | #1 |
How would I go about triggering it so. When a unit has an item, say like a pick (item), and clicks on the item, and selects a mine for example. How would I go about to make it so the unit disappears for say 20 seconds, then reappears with a new item in his inventory. Does this make sense? |
| 07-25-2008, 10:50 AM | #2 |
Sure it makes sense, heres how to do it! You actually need to detect the ability contained within the item, so search through the generic unit events till you find "Unit - A unit Uses an item" Then for conditions you will need: "(Item-type of (Item being manipulated)) Equal to *Your item*" For events you will need this: Trigger: ![]() Actions![]() Custom script: local unit udg_ManipulatingHero![]() Set ItemManipulator = (Hero manipulating item)![]() Item - Remove (Item being manipulated)![]() Wait 20.00 seconds![]() Hero - Create *Your item* and give it to ManipulatingHero![]() Custom script: set udg_ManipulatingHero = nullManipulatingHero is a unit, which you create in your global variables And the rest is pretty self explanatory. And there you go! |
