| 06-27-2007, 11:28 PM | #1 |
Any way this can happen? Trying to make an arcade style map and want to make it so all you need to do to gain a power-up item is to simply walk over it. Haven't had the time to search around, but if anyone has a trick to do this, I'd be happy to know about it Thanks in advance! |
| 06-27-2007, 11:54 PM | #2 |
First, you might want to turn collision off for the item under its preferences and options... Or not. Then you could just have a function that triggers when specified hero gets within a certain radius (close enough to walk over the pick-up) and then have an action that adds that item to the triggering unit's inventory. This would only work in the specific case, unless you had the item as a variable... and the hero... and other such things. If you set it up that way, it could work in more general cases. I hope that sounded as clear in my head as I wrote it just now. ![]() |
| 06-28-2007, 05:03 AM | #3 | |
Quote:
Items only have pathing towards "wind-walked" units. |
| 06-28-2007, 02:37 PM | #4 |
![]() You could probably do something like this for your actions, and then just run it every few seconds: JASS:function GetItem takes nothing returns nothing local item I = <Your Item> local real X = GetItemX(I) local real Y = GetItemY(I) if (IsUnitInRangeXY( <Your Unit>, X, Y, 100) == true) then call UnitAddItem( <Your Unit>, I) endif endfunction ![]() "You dare to catch me?" |
